From 93c0ec419a5ef8ba2cd3fb8eaa6512d80a8f71e3 Mon Sep 17 00:00:00 2001 From: imtodor Date: Tue, 30 Jun 2020 14:56:09 +0300 Subject: [PATCH 1/3] feat: Enabling title format --- _layouts/default.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index f0b8c75..8da9dea 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -2,11 +2,11 @@ - - {% if page.title_prefix %}{{ page.title_prefix }} | {% endif %}{{ page.page_title | default: page.title }}{% if site.use_product_in_title != false %} | {{ site.product }} {% endif %} + {% if page.title_content_format %} {% assign title_content = page.title_content_format %} {% else %} {% assign title_content = {% if page.title_prefix %}{{ page.title_prefix }} | {% endif %}{{ page.page_title | default: page.title }}{% if site.use_product_in_title != false %} | {{ site.product }} {% endif %} %} {% endif %} + {{ title_content }} {% if page.res_type %}{% else %}{% endif %} {% if site.progress_hosting != true %} @@ -18,7 +18,7 @@ "@type": "WebPage", "@id": "https://docs.telerik.com{{site.baseurl}}{{page.url | replace: '.html',''}}" }, - "headline": "{% if page.title_prefix %}{{ page.title_prefix }} | {% endif %}{{ page.page_title | default: page.title }}{% if site.use_product_in_title != false %} | {{ site.product }} {% endif %}", + "headline": "{{ title_content }}", "author":{ "@type":"Organization", "name":"Telerik"}, From 3a84005d0baf500007114bc89ede06c8f5313b2a Mon Sep 17 00:00:00 2001 From: Marin Bratanov Date: Tue, 30 Jun 2020 16:44:59 +0300 Subject: [PATCH 2/3] feat: enable custom title prefix separators and meta description suffix --- _layouts/default.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 8da9dea..d74987a 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -6,8 +6,8 @@ {% if page.title_content_format %} {% assign title_content = page.title_content_format %} {% else %} {% assign title_content = {% if page.title_prefix %}{{ page.title_prefix }} | {% endif %}{{ page.page_title | default: page.title }}{% if site.use_product_in_title != false %} | {{ site.product }} {% endif %} %} {% endif %} - {{ title_content }} - + {% if page.title_prefix %}{{ page.title_prefix }}{% if page.title_prefix_separator %}{{ page.title_prefix_separator }}{% else %} | {% endif %}{% endif %}{{ page.page_title | default: page.title }}{% if site.use_product_in_title != false %} | {{ site.product }} {% endif %} + {% if page.res_type %}{% else %}{% endif %} {% if site.progress_hosting != true %}