From 623a63101d1c21a4a85b56ae7f14825815d99d9b Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 30 Jul 2020 20:10:16 +0200 Subject: [PATCH] Fixed open graph and Twitter cards documentation --- docs/reference/meta-tags.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/reference/meta-tags.md b/docs/reference/meta-tags.md index 4665cb1da..43b67f891 100644 --- a/docs/reference/meta-tags.md +++ b/docs/reference/meta-tags.md @@ -85,6 +85,12 @@ tags to the template: ``` html {% 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 %} @@ -107,6 +113,12 @@ of your site: ``` html {% 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 %}