Add Markdown extensions

This commit is contained in:
Midgard 2020-06-02 18:42:02 +02:00
parent dfaf6a191f
commit 83bb89a787
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -36,7 +36,7 @@ with open("blog.html") as blog_fh:
with open(sys.argv[1]) as file_in: with open(sys.argv[1]) as file_in:
metadata_yaml, content = read(file_in) | parted("---+") metadata_yaml, content = read(file_in) | parted("---+")
metadata = load_yaml(metadata_yaml | join("\n")).data metadata = load_yaml(metadata_yaml | join("\n")).data
body = markdown(content | join("\n"), extras=[]) body = markdown(content | join("\n"), extensions=["abbr", "toc"])
with open(sys.argv[2], "w") as file_out: with open(sys.argv[2], "w") as file_out:
TEMPLATE.format(**metadata, body=body) | write(file=file_out) TEMPLATE.format(**metadata, body=body) | write(file=file_out)