Support basic markdown in meta.comment
This commit is contained in:
parent
e683438ad0
commit
d12b2dee97
4
build.py
4
build.py
|
@ -20,6 +20,7 @@ def main():
|
|||
out = pathlib.Path(args.out)
|
||||
|
||||
md = markdown.Markdown(extensions=["attr_list", "footnotes", "md_in_html", "meta"])
|
||||
comment_md = markdown.Markdown()
|
||||
|
||||
# Clean the output directory
|
||||
if out.exists():
|
||||
|
@ -108,7 +109,8 @@ def main():
|
|||
if meta_comment := meta.get("comment"):
|
||||
for comment in meta_comment:
|
||||
aside = page.new_tag("aside")
|
||||
aside.string = comment
|
||||
html = bs4.BeautifulSoup(comment_md.convert(comment), features="html.parser")
|
||||
aside.extend(html.p.contents)
|
||||
page.header.append(aside)
|
||||
|
||||
# Write the fully templated page
|
||||
|
|
Loading…
Reference in New Issue