chrisdiana / cms.js

Client-Side JavaScript Site Generator

Home Page:http://chrisdiana.github.io/cms.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Date in .md not file date

juanbrujo opened this issue · comments

I noticed CMS.js uses file creation/modification date to order posts. Is there any chance to use Date field in .md file to do so?


---
layout: post 
title: post title
date: 20160729

---
commented

It's possible to rewrite it to support that but it's a bit of work to do.

Right now the date is taken from the filename (334), to load it from the front matter you would have to go down to getContent > parseContent... and it looks like your case is already covered on line 222.

If it doesn't work go and inspect that area t check what date is actually set in your case and work from there.

Resolved in v2.0.