diff --git a/_includes/seo.html b/_includes/seo.html index 8c2f6f72..e500c6f3 100644 --- a/_includes/seo.html +++ b/_includes/seo.html @@ -2,7 +2,11 @@ {%- assign title_separator = site.title_separator | default: '-' -%} {%- 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 seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%}