n***@gmail.com
2015-08-01 13:29:50 UTC
Hi all,
In my Hakyll blog I'm using the classic scheme for posts,
placing files in the form YYYY-MM-DD-title.md in a posts/
subdirectory.
The result is that posts turn into YYYY-MM-DD-title.html
output files, and everything works well.
What I'd like to achieve is to have the posts date part
of the URL to show up as *folders*, i.e.
YYYY/MM/DD/title.html
What is the best way to achieve this? I've tried writing
a customRoute that used regexps to change the url,
but failed (mainly because I'm having trouble using
the Text.Regexp.TDFA module), and then I've tried
to write a route that pulled the date from the metadata
but then I cannot access the filename anymore,
because the function to supply to metadataRoute
is of type Metadata -> Routes, so I can only generate
a whole new route, and I don't have access to the original
route to modify it.
Any hint would be appreciated.
Thank you,
Nicola
In my Hakyll blog I'm using the classic scheme for posts,
placing files in the form YYYY-MM-DD-title.md in a posts/
subdirectory.
The result is that posts turn into YYYY-MM-DD-title.html
output files, and everything works well.
What I'd like to achieve is to have the posts date part
of the URL to show up as *folders*, i.e.
YYYY/MM/DD/title.html
What is the best way to achieve this? I've tried writing
a customRoute that used regexps to change the url,
but failed (mainly because I'm having trouble using
the Text.Regexp.TDFA module), and then I've tried
to write a route that pulled the date from the metadata
but then I cannot access the filename anymore,
because the function to supply to metadataRoute
is of type Metadata -> Routes, so I can only generate
a whole new route, and I don't have access to the original
route to modify it.
Any hint would be appreciated.
Thank you,
Nicola
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.