jaspervdj/hakyll — pull request #304 by nushio3 (2014-10-09 04:38:47+00:00)
Title: Parse article date from directory names in addition to file name

Hakyll can automatically infer the date of an article from its filename.
`Hakyll.Web.Template.Content.dateField`
https://hackage.haskell.org/package/hakyll-4.5.4.0/docs/Hakyll-Web-Template-Context.html#v:dateField

I found it more useful if Hakyll can obtain the date from directory names. My usecase is that I put each of my blog article in separate folder, together with files associated to the post.
```
2014-07-07-I-went-to-beach/
post.md image1.jpeg image2.jpeg
2014-07-18-I-climbed-a-mountain/
post.md photo1.jpeg photo2.jpeg photo3.jpeg
2014-07-29-Look-at-my-new-graphic-library/
post.md graphic.hs figure1.png
````

I'm okay with keeping this patch for myself and not causing the global change. However, I thought it might be useful for others, and I took care this change (hopefully) does not break previously working Hakyll sites. What would you think of this update?