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 %}