mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
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:
parent
d6a2946aef
commit
a5f47cfae9
3 changed files with 12 additions and 4 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue