ametaireau/pelican — pull request #377 by johnmastro (2012-06-17 16:40:59+00:00)
Title: Period archives

Hello,

I have some commits which allow the creation of per-year, per-month, and per-day archives. The code is in `ArticlesGenerator.generate_period_archives()`. Each can be enabled or disabled individually, so you can have e.g. only per-year archives and not the others.

My thinking was that this would allow someone with URLs like `/2012/06/17/title.html` to have an archive (or index) for the year at `/2012/` and for the month at `/2012/06/`.

I added default settings disabling the feature (by setting the `_SAVE_AS` options to `False`).

Also, I added an assertion in `slugify()` to disallow `index` as a slug. Otherwise you could end up with one of these overwriting an actual article. However, I'm not confident that this was the best approach.

Is this a feature you'd be interested in adding? Let me know if you think this should be implemented differently or is missing anything; I'd be happy to do more work on this to get it to the point it can be merged.