add opengraph metadata to pages, via Markdown meta
This commit is contained in:
@@ -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('/')
|
||||
|
||||
5
tests/instance/pages/more-metadata.md
Normal file
5
tests/instance/pages/more-metadata.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Title: title for the page
|
||||
Description: description of this page
|
||||
Image: http://buh.com/test.img
|
||||
|
||||
hello
|
||||
Reference in New Issue
Block a user