add twitter cards

This commit is contained in:
Colin McMillen 2021-07-02 01:08:52 -04:00
parent caf4c58da1
commit 0db949fb2a
2 changed files with 8 additions and 2 deletions

View File

@ -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)

View File

@ -15,6 +15,11 @@
<link href="https://fonts.googleapis.com/css?family=Fira+Mono:500&display=block" rel="stylesheet">
<link rel="stylesheet" href="/pygments.css">
<link rel="stylesheet" href="/style.css">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@mcmillen">
<meta name="twitter:title" content="{title}">
<meta name="twitter:description" content="{summary}">
</head>
<body>