Commit d9c97040 authored by Marien Fressinaud's avatar Marien Fressinaud

fix: Support array values in article Yaml

parent e559b396
......@@ -55,10 +55,11 @@ class Article:
for key, values in md.Meta.items():
article_key = f"ARTICLE_{key.upper()}"
# The Markdown's meta extension extract all the values in arrays, even
# if there is only one value. Because there is no iteration system in
# the template system, for the moment we just get the first value of
# the array.
self.meta[article_key] = values[0]
# if there is only one value.
if len(values) > 1:
self.meta[article_key] = values
else:
self.meta[article_key] = values[0]
self.meta["ARTICLE_CONTENT"] = content
# And we initialize a template for the article
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment