Add canonical tag to homepage

This commit is contained in:
rubenwardy 2023-04-30 00:35:50 +01:00
parent c252785070
commit 45516a7589
2 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,7 @@ layout: compress
<meta name="author" content="rubenwardy">
<meta name="flattr:id" content="gl763e">
<link rel="canonical" href="https://rubenwardy.com/minetest_modding_book{{ page.url }}" />
<link rel="canonical" href="https://rubenwardy.com/minetest_modding_book{{ page.url }}">
{% assign oldSegment = "/" | append: language | append: "/" %}
{% for other_lang in site.data.languages %}
@ -29,7 +29,7 @@ layout: compress
{% assign newSegment = "/" | append: other_lang.code | append: "/" %}
<link rel="alternate" hreflang="{{ other_lang.code }}"
href="{{ page.url | replace: oldSegment, newSegment | relative_url }}" />
href="{{ page.url | replace: oldSegment, newSegment | relative_url }}">
{% endunless %}
{% endfor %}

View File

@ -5,7 +5,9 @@ layout: none
<html>
<head>
<title>Minetest Modding Book</title>
<meta name="og:description" content="An easy guide to learn how to create mods for Minetest">
<meta name="description" content="An easy guide to learn how to create mods for Minetest">
<link rel="canonical" href="https://rubenwardy.com/minetest_modding_book/">
<script>
var languages = {{ site.data.languages | jsonify }};
function getLanguage() {