Shawn Erquhart 9fd0ff4a6a
return date object from date/datetime widgets if no format set (#1296)
* return date object from date/datetime widgets if no format set

BREAKING CHANGE

As of 1.0, the documented behavior for the date and datetime widgets was
to always return a string value, but they were instead returning a date
object if the default date was not manually changed by the user. This
was addressed in #1143, but it became clear afterward that static site
generators were depending on the raw date objects that Netlify CMS was
unintentionally producing. Remaining as is or addressing the bug were
both "breaking" states, so this commit reverts to producing raw date
objects when no format is explicitly set.

It is now considered an edge case to require string dates, as most
static site generators expect to parse a raw date against formatting in
a site's templates.

Also note that this commit improves the original behavior by always
providing a date object when no format is provided, even if the user
manually changes the value.

* produce raw date when no format is provided
2018-05-25 12:03:44 -04:00
..
2018-04-23 17:22:15 -04:00
2018-05-17 17:14:29 -04:00
2018-03-29 17:04:47 -04:00
2018-03-29 17:04:47 -04:00

Netlify CMS Website & Docs

This directory builds netlifycms.org. If you'd like to propose changes to the site or docs, you'll find the source files in here.

Local development

The site is built with Hugo, managed as an npm dependency via hugo-bin.

To run the site locally, you'll need to have Node and Yarn installed on your computer.

From your terminal window, cd into the website directory of the repo, and run

yarn
yarn start

Then visit http://localhost:3000/ - BrowserSync will automatically reload CSS or refresh the page when stylesheets or content changes.