~xdavidwu/xdavidwu.link

65c4b4e41a202a59214719f400e07580deb44b8a — Michael Rose 6 years ago cba8274
Replace `|` with HTML entity when used as title separator

ref: #760, #1506
2 files changed, 7 insertions(+), 2 deletions(-)

M CHANGELOG.md
M _includes/seo.html
M CHANGELOG.md => CHANGELOG.md +1 -0
@@ 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)


M _includes/seo.html => _includes/seo.html +6 -2
@@ 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 %}