generators: Use the static format to read Static metadata

This cuts down on the remaining difference between static files and
articles/pages.  The main difference is that path-based metadata is
now parsed for static content.
This commit is contained in:
W. Trevor King 2013-01-04 16:12:34 -05:00
commit 29cdb37af3
2 changed files with 10 additions and 7 deletions

View file

@ -347,7 +347,7 @@ def read_file(path, fmt=None, settings=None):
metadata.update(reader_metadata)
# eventually filter the content with typogrify if asked so
if settings and settings.get('TYPOGRIFY'):
if content and settings and settings.get('TYPOGRIFY'):
from typogrify.filters import typogrify
content = typogrify(content)
metadata['title'] = typogrify(metadata['title'])