mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 14:50:19 +00:00
Add social cards support
This commit is contained in:
Vendored
+12
@@ -15,16 +15,28 @@
|
||||
|
||||
{% if pagename == 'index' %}
|
||||
<link rel="canonical" href="https://docs.python-guide.org/"/>
|
||||
<meta property="og:url" content="https://docs.python-guide.org/">
|
||||
{% elif pagename == '404' %}
|
||||
{# No canonical on our 404 template. #}
|
||||
{% else %}
|
||||
<link rel="canonical" href="https://docs.python-guide.org/{{ pagename }}/"/>
|
||||
<meta property="og:url" content="https://docs.python-guide.org/{{ pagename }}">
|
||||
{% endif %}
|
||||
|
||||
<link rel="icon" type="image/png" href="https://media.readthedocs.org/images/favicon.png">
|
||||
|
||||
<meta name="google-site-verification" content="013PxE2_8KX9jdUSC5gr8QsfdxTXr1mFgmD9zplp5II" />
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta property="twitter:image" content="https://docs.python-guide.org/_static/python-guide-logo.png">
|
||||
<meta property="og:image" content="https://docs.python-guide.org/_static/python-guide-logo.png">
|
||||
<meta property="og:title" content="{{ title }}{{ titlesuffix }}">
|
||||
<meta property="og:type" content="article">
|
||||
{%- if metatags is defined %}
|
||||
{# FIXME: For some reason the `meta` dict is always empty. Extract the desc from the `metatags` text. #}
|
||||
<meta property="og:description" content="{{ metatags[15:-24] }}">
|
||||
{%- endif %}
|
||||
|
||||
<script>window.rp_prop_id = '29182759436';</script>
|
||||
<script src="https://srv.realpython.net/tag.js" async></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user