Fix: Prevent double title issue in SEO metadata by updating seo.html (#4959)
This commit is contained in:
parent
b939edc600
commit
96149caa54
@ -2,7 +2,11 @@
|
|||||||
{%- assign title_separator = site.title_separator | default: '-' -%}
|
{%- assign title_separator = site.title_separator | default: '-' -%}
|
||||||
|
|
||||||
{%- assign page_title = page.title | default: site.title | replace: '|', '|' -%}
|
{%- assign page_title = page.title | default: site.title | replace: '|', '|' -%}
|
||||||
{%- assign seo_title = page_title | append: " " | append: title_separator | append: " " | append: site.title | replace: '|', '|' -%}
|
{%- if page_title contains site.title -%}
|
||||||
|
{%- assign seo_title = page_title | replace: '|', '|' -%}
|
||||||
|
{%- else -%}
|
||||||
|
{%- assign seo_title = page_title | append: " " | append: title_separator | append: " " | append: site.title | replace: '|', '|' -%}
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
{%- assign page_title = page_title | markdownify | strip_html | strip_newlines | escape_once -%}
|
{%- assign page_title = page_title | markdownify | strip_html | strip_newlines | escape_once -%}
|
||||||
{%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%}
|
{%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user