this repo has no description

fix: add canonical URL to all pages

hauleth.dev 3f2679fd 1c93ec66

verified
Changed files
+10 -3
templates
+2 -2
flake.lock
···
"nixpkgs": {
"locked": {
"lastModified": 0,
-
"narHash": "sha256-FurMxmjEEqEMld11eX2vgfAx0Rz0JhoFm8UgxbfCZa8=",
-
"path": "/nix/store/jkbly0r78qgqgsi7znsxc8mbh8ydfq4n-source",
+
"narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=",
+
"path": "/nix/store/ad1fkqvkbxhap0gpb688bgrad221lgwj-source",
"type": "path"
},
"original": {
+1 -1
netlify.toml
···
publish = "public/"
[build.environment]
-
ZOLA_VERSION = "0.19.2"
+
ZOLA_VERSION = "0.20.0"
[context.deploy-preview]
command = "zola build --drafts --base-url $DEPLOY_PRIME_URL"
+7
templates/index.html
···
{% endblock rss %}
{% block og_preview %}
+
{%- if section -%}
+
<link rel="canonical" href="{{ section.permalink }}" />
+
{%- elif page -%}
+
<link rel="canonical" href="{{ page.permalink }}" />
+
{%- else -%}
+
<link rel="canonical" href="{{ current_url }}" />
+
{%- endif -%}
{{ social::og_preview() }}
{%- if config.extra.twitter.site -%}