Skip to content

Commit

Permalink
Identify canonical and alternate URLs (#1026)
Browse files Browse the repository at this point in the history
Co-authored-by: ann0see <[email protected]>
  • Loading branch information
gilgongo and ann0see authored Sep 4, 2024
1 parent 4b5172f commit 257dbc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions _includes/headtags.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<meta charset="utf-8">
<!-- Canonical and Alternate Links -->
{% assign sorted_languages = site.languages | sort %}
{% for lng in sorted_languages %}
{% if lng == site.default_lang %}
<link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
{% else %}
{% comment %}
English URLs don't have a lang subdirectory since it's the default language.
See https://github.com/untra/polyglot
{% endcomment %}
<link rel="canonical" hreflang="en" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
{% for lng in site.languages | sort %}
{% if lng != "en" %}
<link rel="alternate" hreflang="{{ lng }}" href="{{ site.url }}{{ site.baseurl }}/{{ lng }}{{ page.url }}">
{% endif %}
{% endfor %}
<link rel="alternate" hreflang="x-default" href="{{ site.url }}/{{ page.url }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/assets/css/fox.min.css">
<link rel="stylesheet" href="/assets/css/fw.css">
Expand Down
2 changes: 1 addition & 1 deletion wiki/en/misc/1-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Jamulus lets you play, rehearse, or jam with your friends, your band, or anyone
<div class="fx-row fx-row-center-xs" id="bannercontainer">
<div class="fx-col-100-xs">
<figure class="mainbannerfig">
<a href="wiki/Getting-Started" rel="canonical">
<a href="wiki/Getting-Started">
<img src="{% include img/en-screenshots/main-screen-medium.inc %}" style="border: 5px solid grey;" id="jamulusbanner" loading="lazy" alt="A screenshot of the main mixer window showing five people from different countries connected.">
</a>
<figcaption>Jamulus is international</figcaption>
Expand Down

0 comments on commit 257dbc8

Please sign in to comment.