getpelican/pelican — pull request #1485 by foresto (2014-09-30 06:28:59+00:00)
Title: Ignore empty metadata.

I originally set out to stop pelican from creating files named `.html` when an empty Slug: definition appeared in a Markdown file, but after browsing the reader code, I saw there were more opportunities for empty values to slip in. Since I don't know of any metadata fields that would make sense with empty values, I made `read_file()` filter out any such items after it gathers the metadata.

The code filters out most non-true values, including empty strings and `None`, but it preserves numeric zero values. It runs after the cache phase, so as not to affect caching behavior when whitespace changes are made to a file.

Fixes getpelican/pelican#1469.
Might also fix getpelican/pelican#1398?