getpelican/pelican — pull request #744 by lfalin (2013-02-28 11:18:50+00:00)
Title: Added settings to allow supression of Authors, Tags, and Categories pages.

This was a side effect of my porting the zh2 theme to pelican. I didn't want any special pages for tags and categories, and since it's a single-author blog I didn't really need a set of authors pages either.

To disable the generation of these pages, just set the following to false in your config file:

GENERATE_AUTHORS = False
GENERATE_TAGS = False
GENERATE_CATEGORIES = False

The default values for these settings mimic existing behavior.

Note that this doesn't stop the default template generation of these pages, just the pages themselves.

For example if you have an article with the "general" tag, the following is generated by default:

...
tags.html (contains link to ./tags/general.html)
tags/
general.html

Setting GENERATE_TAGS = false will disable the creation of tags/*.html and the tags folder. However tags.html (and authors.html and categories.html) is controlled by the existing DIRECT_TEMPLATES setting.

If you don't want authors.html, categories.htm, and tags.html to be generated, you have to disable them by removing them from the DIRECT_TEMPLATES setting:

DIRECT_TEMPLATES = (('index'),)

It seems like it might be better if both of these things were handled in a single setting, but I didn't want to break existing functionality by changing how DIRECT_TEMPLATES worked.