Skip to content

Commit

Permalink
Replace | with HTML entity when used as title separator
Browse files Browse the repository at this point in the history
  • Loading branch information
mmistakes committed Jan 30, 2018
1 parent 85f60fb commit 2344ec1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 6 additions & 2 deletions _includes/seo.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}
Expand Down Expand Up @@ -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 %}
Expand Down
3 changes: 2 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 2344ec1

Please sign in to comment.