about summary refs log tree commit diff stats
path: root/templates
diff options
context:
space:
mode:
authorAlan Pearce2024-02-20 17:08:59 +0100
committerAlan Pearce2024-02-20 17:08:59 +0100
commitfa345b1d1e11cc66ed92605382887fd4367ef97a (patch)
treefda555ec02ad606d42d089b01107cbfead01f68d /templates
parentf138825a20271b4c117ddd42ea6749a4378a9efb (diff)
downloadzola-bearblog-fa345b1d1e11cc66ed92605382887fd4367ef97a.tar.lz
zola-bearblog-fa345b1d1e11cc66ed92605382887fd4367ef97a.tar.zst
zola-bearblog-fa345b1d1e11cc66ed92605382887fd4367ef97a.zip
Make language switcher more semantic
Diffstat (limited to 'templates')
-rw-r--r--templates/language_switcher.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/language_switcher.html b/templates/language_switcher.html
index 3af5e66..3968c73 100644
--- a/templates/language_switcher.html
+++ b/templates/language_switcher.html
@@ -1,11 +1,11 @@
 {% if config.extra.language_switcher %}
-  <nav>
+  <nav class="lang">
     {%- set language_agnostic_path = current_path | default(value="/") | replace(from='/' ~ lang ~ '/', to = '/') | trim_start_matches(pat = '/') -%}
     {%- for tr in config.extra.translations %}
       {%- if tr.code == lang %}
         <strong>{{ tr.name }}</strong>
       {%- else %}
-          <a href="{{ get_url(path=language_agnostic_path, lang=tr.code) ~ "/" }}">{{ tr.name }}</a>
+          <a href="{{ get_url(path=language_agnostic_path, lang=tr.code) ~ "/" }}" hreflang="{{ tr.code }}">{{ tr.name }}</a>
       {%- endif %}
     {%- endfor %}
   </nav>