add opengraph metadata to pages, via Markdown meta

This commit is contained in:
2021-01-17 23:02:14 -06:00
parent b0795999fe
commit c25fefa9e3
5 changed files with 32 additions and 2 deletions

View File

@@ -30,6 +30,15 @@ def test_page_without_title_metadata(client):
assert b'<h1>this page doesn\'t have a title!</h1>' in response.data
def test_page_with_card_metadata(client):
"""Test that a page with opengraph metadata."""
response = client.get('/more-metadata')
assert response.status_code == 200
assert b'<meta property="og:title" content="title for the page">' in response.data
assert b'<meta property="og:description" content="description of this page">' in response.data
assert b'<meta property="og:image" content="http://buh.com/test.img">' in response.data
def test_page_has_modified_timestamp(client):
"""Test that pages have modified timestamps in them."""
response = client.get('/')

View File

@@ -0,0 +1,5 @@
Title: title for the page
Description: description of this page
Image: http://buh.com/test.img
hello