From 0db949fb2a8a9a2facb9ed928d6e722b5f260fd8 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Fri, 2 Jul 2021 01:08:52 -0400 Subject: [PATCH] add twitter cards --- build.py | 5 +++-- template.html | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index 9ce2fa7..75d5a5c 100644 --- a/build.py +++ b/build.py @@ -114,14 +114,15 @@ def process_markdown_files(): html_content = markdown.markdown( text, extensions=md_extensions, output_format='html5') + summary = find_summary(html_content) output = template.format( - title=title, content=html_content, page_url=page_url) + title=title, content=html_content, page_url=page_url, summary=summary) update_date = find_update_date(text) if update_date: blog_entry['url'] = 'https://www.mcmillen.dev/' + page_url blog_entry['date'] = update_date - blog_entry['summary'] = find_summary(html_content) + blog_entry['summary'] = summary blog_entry['content'] = html_content blog_entries.append(blog_entry) diff --git a/template.html b/template.html index 5d49e7c..c45ad62 100644 --- a/template.html +++ b/template.html @@ -15,6 +15,11 @@ + + + + +