assign canonical directly if custom value exists (#2021)
This commit is contained in:
parent
2274abb67d
commit
77059e3710
1 changed files with 5 additions and 1 deletions
|
@ -14,7 +14,11 @@
|
|||
{%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url %}
|
||||
{% if page.canonical_url %}
|
||||
{%- assign canonical_url = page.canonical_url %}
|
||||
{% else %}
|
||||
{%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url %}
|
||||
{% endif %}
|
||||
|
||||
{%- assign seo_description = page.description | default: page.excerpt | default: site.description -%}
|
||||
{%- if seo_description -%}
|
||||
|
|
Loading…
Reference in a new issue