Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle dates wrapped in quotes #212

Closed
ghost opened this issue Apr 26, 2018 · 4 comments
Closed

Handle dates wrapped in quotes #212

ghost opened this issue Apr 26, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 26, 2018

I added Netlify CMS to my Jigsaw blog.

The markdown files it generates have dates that look like this date: '2018-04-23'.

Jigsaw can't read this properly, so the date I get on my post created from their CMS shows January 1, 1970.

There's already an open issue on their repo about this but I thought that I should bring it up here too.

I suggest that Jigsaw be tweaked in a way that allows it to read the date with or without quotes.

@ghost
Copy link
Author

ghost commented Apr 27, 2018

For reference: decaporg/decap-cms#1271

@wilburpowery
Copy link

wilburpowery commented May 18, 2018

In my own site I use quotes with the dates.

author: "Wilbur Powery"
date: "2018-05-17"
section: content

I don't get no issues with my posts collection when using quotes in my post date.

@ghost
Copy link
Author

ghost commented May 18, 2018

Oh, so it works with double quotes then? I see.

Unfortunately the quotes added by Netlify CMS are single quotes and they seem to not be parsed correctly by Jigsaw.

Well, this is a minor issue anyway and will become irrelevant when/if they eventually fix the issue on their end, I'll keep this issue open though.

@tristanbailey
Copy link

@raniesantos can you do {{ date('c', strtotime($page->date)) }} which I do for an rss page, (with your own date letter fromat of course.)

@damiani damiani closed this as completed Jul 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants