mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed open graph and Twitter cards documentation
This commit is contained in:
parent
25b2af52c7
commit
623a63101d
@ -85,6 +85,12 @@ tags to the template:
|
|||||||
|
|
||||||
``` html
|
``` html
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
|
{% set title = config.site_name %}
|
||||||
|
{% if page and page.meta and page.meta.title %}
|
||||||
|
{% set title = config.site_name ~ " - " ~ page.meta.title %}
|
||||||
|
{% elif page and page.title and not page.is_homepage %}
|
||||||
|
{% set title = config.site_name ~ " - " ~ page.title | striptags %}
|
||||||
|
{% endif %}
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:title" content="{{ title }}" />
|
<meta property="og:title" content="{{ title }}" />
|
||||||
<meta property="og:description" content="{{ config.site_description }}" />
|
<meta property="og:description" content="{{ config.site_description }}" />
|
||||||
@ -107,6 +113,12 @@ of your site:
|
|||||||
|
|
||||||
``` html
|
``` html
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
|
{% set title = config.site_name %}
|
||||||
|
{% if page and page.meta and page.meta.title %}
|
||||||
|
{% set title = config.site_name ~ " - " ~ page.meta.title %}
|
||||||
|
{% elif page and page.title and not page.is_homepage %}
|
||||||
|
{% set title = config.site_name ~ " - " ~ page.title | striptags %}
|
||||||
|
{% endif %}
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:site" content="<username>" />
|
<meta name="twitter:site" content="<username>" />
|
||||||
<meta name="twitter:creator" content="<username>" />
|
<meta name="twitter:creator" content="<username>" />
|
||||||
|
Loading…
Reference in New Issue
Block a user