Use macros
This commit is contained in:
parent
1ff244c6ca
commit
238b0e5aad
2 changed files with 18 additions and 8 deletions
|
@ -1,7 +1,14 @@
|
|||
{% macro canonicalUrl(site, page) -%}
|
||||
{{ site.url }}
|
||||
{{- page.url != '//' ? page.url }}
|
||||
{%- endmacro %}
|
||||
|
||||
{% import _self as helpers %}
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="canonical" href="{{ site.url }}{{ page.url == '//' ? '' : page.url }}" />
|
||||
<link rel="canonical" href="{{ helpers.canonicalUrl(site, page) }}">
|
||||
|
||||
{% if page.meta.description %}
|
||||
<meta name="description" content="{{ page.meta.description|e('html') }}">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue