jsonld support added. og as seperate partials
This commit is contained in:
parent
02dcad911b
commit
f3930d159d
8 changed files with 194 additions and 101 deletions
42
templates/partials/og.html
Normal file
42
templates/partials/og.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
{# <!-- Choosing locale --> #}
|
||||
{% if OG_LOCALE %}
|
||||
{% set default_locale = OG_LOCALE %}
|
||||
{% else %}
|
||||
{% set default_locale = 'en_US' %}
|
||||
{% endif %}
|
||||
|
||||
{# <!-- Choosing cover image --> #}
|
||||
{% if HEADER_COVER %}
|
||||
{% set default_cover = SITEURL+"/"+HEADER_COVER %}
|
||||
{% else %}
|
||||
{% set default_cover = SITEURL+"/"+THEME_STATIC_DIR+"/images/home-bg.jpg" %}
|
||||
{% endif %}
|
||||
|
||||
{# <!-- Choosing description --> #}
|
||||
{% if SITESUBTITLE %}
|
||||
{% set description = SITESUBTITLE %}
|
||||
{% else %}
|
||||
{% set description = 'View the blog.' %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Open Graph -->
|
||||
{% for admin in FACEBOOK_ADMINS %}
|
||||
<meta property="fb:admins" content="{{ admin }}" />
|
||||
{% endfor %}
|
||||
<meta property="og:site_name" content="{{ SITENAME }}"/>
|
||||
<meta property="og:type" content="blog"/>
|
||||
<meta property="og:title" content="{{ SITENAME }}"/>
|
||||
<meta property="og:description" content="{{ description }}"/>
|
||||
<meta property="og:locale" content="{{ default_locale }}"/>
|
||||
<meta property="og:url" content="{{ SITEURL }}"/>
|
||||
<meta property="og:image" content="{{ default_cover }}">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
{% for name,link in SOCIAL if name.lower() in ['twitter'] %}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@{{ link|replace('http://', 'https://')|replace('https://twitter.com/', '') }}">
|
||||
<meta name="twitter:title" content="{{ SITENAME }}">
|
||||
<meta name="twitter:description" content="{{ description}}">
|
||||
<meta name="twitter:url" content="{{ SITEURL }}">
|
||||
<meta name="twitter:image:src" content="{{ default_cover }}">
|
||||
{% endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue