Replace | with HTML entity when used as title separator

ref: #760, #1506
This commit is contained in:
Michael Rose 2018-01-29 20:38:47 -05:00
parent 63e2226054
commit 1c0f19158d
3 changed files with 9 additions and 3 deletions

View file

@ -22,6 +22,7 @@
* Remove misleading underline hover state on feature row items.
* Properly escape quotes in `site.social.name` and `site.name`. [#1485](https://github.com/mmistakes/minimal-mistakes/pull/1485)
* Fix typo in upgrading documentation. [#1487](https://github.com/mmistakes/minimal-mistakes/pull/1487)
* Replace `|` with HTML entity when used as title separator. [#760](https://github.com/mmistakes/minimal-mistakes/issues/760)
## [4.9.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.9.0)

View file

@ -4,8 +4,12 @@
{%- endif -%}
{%- assign seo_url = seo_url | default: site.github.url -%}
{% if site.title_separator %}
{% assign title_separator = site.title_separator | default: '-' | replace: '|', '|' %}
{% endif %}
{%- if page.title -%}
{%- assign seo_title = page.title | append: " " | append: site.title_separator | append: " " | append: site.title -%}
{%- assign seo_title = page.title | append: " " | append: title_separator | append: " " | append: site.title -%}
{%- endif -%}
{%- if seo_title -%}
@ -50,7 +54,7 @@
{%- assign og_type = "website" -%}
{%- endif -%}
<title>{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ site.title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %}</title>
<title>{{ 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 %}</title>
<meta name="description" content="{{ seo_description }}">
{% if author.name %}

View file

@ -4,7 +4,7 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar:
nav: docs
last_modified_at: 2018-01-18T10:26:34-05:00
last_modified_at: 2018-01-29T20:38:03-05:00
toc: true
---
@ -32,6 +32,7 @@ toc: true
* Remove misleading underline hover state on feature row items.
* Properly escape quotes in `site.social.name` and `site.name`. [#1485](https://github.com/mmistakes/minimal-mistakes/pull/1485)
* Fix typo in upgrading documentation. [#1487](https://github.com/mmistakes/minimal-mistakes/pull/1487)
* Replace `|` with HTML entity when used as title separator. [#760](https://github.com/mmistakes/minimal-mistakes/issues/760)
## [4.9.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.9.0)