1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-12-18 10:25:58 +01:00

Added new banner for social sharing

This commit is contained in:
squidfunk 2020-03-29 16:27:34 +02:00
commit 31c6cec15a
3 changed files with 10 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

View File

@ -7,11 +7,15 @@
{% if page and page.title and not page.is_homepage %} {% if page and page.title and not page.is_homepage %}
{% set title = config.site_name ~ " - " ~ page.title | striptags %} {% set title = config.site_name ~ " - " ~ page.title | striptags %}
{% endif %} {% endif %}
{% set image = config.site_url ~ 'assets/images/illustration.png' %} {% set image = config.site_url ~ 'assets/images/banner.png' %}
<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 }}">
<meta property="og:url" content="{{ page.canonical_url }}"> <meta property="og:url" content="{{ page.canonical_url }}">
<meta property="og:image" content="{{ image }}"> <meta property="og:image" content="{{ image }}">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1080">
<meta property="og:image:height" content="568">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@squidfunk"> <meta name="twitter:site" content="@squidfunk">
<meta name="twitter:creator" content="@squidfunk"> <meta name="twitter:creator" content="@squidfunk">

View File

@ -32,13 +32,17 @@
{% endif %} {% endif %}
<!-- The image needs to have an absolute URL --> <!-- The image needs to have an absolute URL -->
{% set image = config.site_url ~ 'assets/images/illustration.png' %} {% set image = config.site_url ~ 'assets/images/banner.png' %}
<!-- Open graph meta tags --> <!-- Open graph meta tags -->
<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 }}" />
<meta property="og:url" content="{{ page.canonical_url }}" /> <meta property="og:url" content="{{ page.canonical_url }}" />
<meta property="og:image" content="{{ image }}" /> <meta property="og:image" content="{{ image }}" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1080" />
<meta property="og:image:height" content="568" />
<!-- Twitter meta tags --> <!-- Twitter meta tags -->
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />