From f152a3cefec37a7f7fbd867eed6cd4337dee99cf Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Thu, 30 Sep 2021 19:01:31 +0100 Subject: Run post preambles through md in index --- generate.py | 1 + templates/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/generate.py b/generate.py index 6328a9d..956e842 100755 --- a/generate.py +++ b/generate.py @@ -118,6 +118,7 @@ def main(argv=['generate.py']): env = Environment(loader=FileSystemLoader('./templates'), autoescape=True) env.globals['site'] = {'baseurl': baseurl} env.filters['datefmt'] = lambda d, f='%Y-%m-%d': d.strftime(f) + env.filters['md'] = md posts = glob(os.path.join(CONTENT, 'posts', '*')) posts = [p for p in posts if not os.path.split(p)[1].startswith('_')] diff --git a/templates/index.html b/templates/index.html index c32a7fb..6a64d79 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11,7 +11,7 @@

{{ post.title }}

- {{ post.pre }} + {{ post.pre|md }} Read more...