I want to do something like what docpad-plugin-dateurls does but in the context of static site generation.
I need, for example, to map the file /src/documents/posts/2013-09-10-post-title.html
to the url http://localhost:9778/posts/2013/09/10/post-title.html
Which would be the best approach to acomplish this requirement?
I finally implemented this by setting the outPath
of each document in the renderBefore
event.
See here: https://github.com/gschuager/blog/blob/7451fbcb829ad93154d24b281c7e8e30d3a0edac/docpad.js#L83