diff options
Diffstat (limited to 'nikola/data/themes/base/templates/post_helper.tmpl')
| -rw-r--r-- | nikola/data/themes/base/templates/post_helper.tmpl | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/nikola/data/themes/base/templates/post_helper.tmpl b/nikola/data/themes/base/templates/post_helper.tmpl index 85ba378..c4e0ed1 100644 --- a/nikola/data/themes/base/templates/post_helper.tmpl +++ b/nikola/data/themes/base/templates/post_helper.tmpl @@ -38,33 +38,33 @@ </%def> <%def name="open_graph_metadata(post)"> - %if use_open_graph: - <meta name="og:title" content="${post.title()[:70]|h}"> - <meta name="og:url" content="${abs_link(permalink)}"> - %if post.description(): - <meta name="og:description" content="${post.description()[:200]|h}"> - %else: - <meta name="og:description" content="${post.text(strip_html=True)[:200]|h}"> - %endif - <meta name="og:site_name" content="${blog_title|striphtml}"> - <meta name="og:type" content="article"> +%if use_open_graph: + <meta name="og:title" content="${post.title()[:70]|h}"> + <meta name="og:url" content="${abs_link(permalink)}"> + %if post.description(): + <meta name="og:description" content="${post.description()[:200]|h}"> + %else: + <meta name="og:description" content="${post.text(strip_html=True)[:200]|h}"> %endif + <meta name="og:site_name" content="${blog_title|striphtml}"> + <meta name="og:type" content="article"> +%endif </%def> <%def name="twitter_card_information(post)"> - %if twitter_card and twitter_card['use_twitter_cards']: - <meta name="twitter:card" content="${twitter_card.get('card', 'summary')|h}"> - %if 'site:id' in twitter_card: - <meta name="twitter:site:id" content="${twitter_card['site:id']}"> - %elif 'site' in twitter_card: - <meta name="twitter:site" content="${twitter_card['site']}"> - %endif - %if 'creator:id' in twitter_card: - <meta name="twitter:creator:id" content="${twitter_card['creator:id']}"> - %elif 'creator' in twitter_card: - <meta name="twitter:creator" content="${twitter_card['creator']}"> - %endif +%if twitter_card and twitter_card['use_twitter_cards']: + <meta name="twitter:card" content="${twitter_card.get('card', 'summary')|h}"> + %if 'site:id' in twitter_card: + <meta name="twitter:site:id" content="${twitter_card['site:id']}"> + %elif 'site' in twitter_card: + <meta name="twitter:site" content="${twitter_card['site']}"> + %endif + %if 'creator:id' in twitter_card: + <meta name="twitter:creator:id" content="${twitter_card['creator:id']}"> + %elif 'creator' in twitter_card: + <meta name="twitter:creator" content="${twitter_card['creator']}"> %endif +%endif </%def> <%def name="mathjax_script(post)"> |
