Adds hreflang attribute to language version links (#72)

This helps search engines and other user agents to find different versions of the page.
This commit is contained in:
Tom Morris 2019-04-21 03:46:51 +01:00 committed by Lunny Xiao
parent 333dfb107d
commit 5ce737fbe3
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@
</p>
<p>
{{ $lang := .Lang }}{{ $base := .Site.BaseURL }}{{ range .Site.Languages }}
<a class="nav-link" href="{{ $base }}{{ .Lang }}">{{ .LanguageName }}</a>
<a class="nav-link" href="{{ $base }}{{ .Lang }}" hreflang="{{ .Lang }}">{{ .LanguageName }}</a>
{{ end }}
</p>
</div>