Allow overriding reader extensions.

This adds an extensions setting all readers in the style of [ext]_EXTENSIONS. So for the MarkdownReader, who's extension is "md", the setting read is MD_EXTENSIONS.

The settings allow overriding the default options passed through the readers. In the case of Markdown the default values are ['codehilite','extra'], but user may change this through the setting:

MD_EXTENSIONS = ['footnotes','abbr','codehilite']
This commit is contained in:
Borgar 2011-06-15 23:48:54 +00:00
commit a5f47cfae9
3 changed files with 12 additions and 4 deletions

View file

@ -211,7 +211,7 @@ class ArticlesGenerator(Generator):
files = self.get_files(self.path, exclude=['pages',])
all_articles = []
for f in files:
content, metadata = read_file(f)
content, metadata = read_file(f, settings=self.settings)
# if no category is set, use the name of the path as a category
if 'category' not in metadata.keys():