diff --git a/_includes/seo.html b/_includes/seo.html index 0141042b..be147858 100644 --- a/_includes/seo.html +++ b/_includes/seo.html @@ -4,15 +4,13 @@ {%- endif -%} {%- assign seo_url = seo_url | default: site.github.url -%} -{% assign title_separator = site.title_separator | default: '-' | replace: '|', '|' %} +{% assign title_separator = site.title_separator | default: '-' %} -{%- if page.title -%} - {%- assign seo_title = page.title | append: " " | append: title_separator | append: " " | append: site.title -%} -{%- endif -%} +{%- assign page_title = page.title | default: site.title | replace: '|', '|' -%} +{%- assign seo_title = page_title | append: " " | append: title_separator | append: " " | append: site.title | replace: '|', '|' -%} -{%- if seo_title -%} - {%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%} -{%- 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 -%} {% if page.canonical_url %} {%- assign canonical_url = page.canonical_url %} @@ -47,7 +45,7 @@ {%- assign og_type = "website" -%} {%- endif -%} -{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %} +{{ seo_title }}{% if paginator %}{% unless paginator.page == 1 %} {{ title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %} {% if author.name %} @@ -60,7 +58,7 @@ - + {% if seo_description %} @@ -75,7 +73,7 @@ {% if site.twitter.username %} - + diff --git a/_layouts/archive.html b/_layouts/archive.html index 08beb89a..84c285bc 100644 --- a/_layouts/archive.html +++ b/_layouts/archive.html @@ -23,4 +23,4 @@ layout: default {% endunless %} {{ content }} - \ No newline at end of file + diff --git a/_layouts/single.html b/_layouts/single.html index 5030be26..a36bfa8c 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -22,7 +22,7 @@ layout: default {% include sidebar.html %}
- {% if page.title %}{% endif %} + {% if page.title %}{% endif %} {% if page.excerpt %}{% endif %} {% if page.date %}{% endif %} {% if page.last_modified_at %}{% endif %}