Make language switcher more semantic
1 file changed, 2 insertions(+), 2 deletions(-)
M templates/language_switcher.html → 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>