Add dynamic localization to author URL in footer
Say the author URL is `about/legal`, then `absLangURL` makes sure
1. it will go to the right page of the current language
2. it will not be a relative link (which breaks when in other sections)
External URL (starting with `http(s)://` will still work.
| | |
| | | <footer class="pt-2 pb-2"> |
| | | <div class="wrap"> |
| | | {{- $author := site.Params.author }} |
| | | <p>© <span class="year">{{ now.Year }}</span>{{ with $author }} <a href ="{{ .url }}" target="_blank" rel="noopener">{{ .name }}</a>{{ end }}</p> |
| | | <p>© <span class="year">{{ now.Year }}</span>{{ with $author }} <a href ="{{ absLangURL .url }}" target="_blank" rel="noopener">{{ .name }}</a>{{ end }}</p> |
| | | <a href="#pagetop" id="toTop" title={{ T "to_top" }}></a> |
| | | </div> |
| | | </footer> |