forked from github/pelican
Pass the metadata conversion in Markdown as well,
so that dates and tags are correctly processed. Signed-off-by: Guillaume B <guitreize@gmail.com>
This commit is contained in:
parent
178ab7e5d2
commit
c8184ffcbc
1 changed files with 5 additions and 1 deletions
|
|
@ -49,7 +49,11 @@ class MarkdownReader(object):
|
|||
|
||||
metadatas = {}
|
||||
for name, value in md.Meta.items():
|
||||
metadatas[name.lower()] = value[0]
|
||||
if name in _METADATAS_FIELDS:
|
||||
meta = _METADATAS_FIELDS[name](value[0])
|
||||
else:
|
||||
meta = value[0]
|
||||
metadatas[name.lower()] = meta
|
||||
return content, metadatas
|
||||
|
||||
_EXTENSIONS = {'rst': RstReader, 'md': MarkdownReader} # supported formats
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue