refactor: use relLangURL to build relative links
For better i18n support Fixes archive page path Remove tag cloud term exclusion closes https://github.com/CaiJimmy/hugo-theme-stack/issues/8
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
{{ range first .Site.Params.widgets.archive.limit ($archive) }}
|
||||
{{ $id := lower (replace .Key " " "-") }}
|
||||
<div class="archive-year">
|
||||
<a href="{{ $.Site.BaseURL }}{{ $.Site.Params.widgets.archive.path }}#{{ $id }}">
|
||||
<a href="{{ $.Site.Params.widgets.archive.path | relLangURL }}#{{ $id }}">
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<span class="count">{{ len .Pages }}</span>
|
||||
</a>
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
{{ if gt (len $archive) .Site.Params.widgets.archive.limit }}
|
||||
<div class="archive-year">
|
||||
<a href="{{ $.Site.BaseURL }}/archive">
|
||||
<a href="{{ $.Site.Params.widgets.archive.path | relLangURL }}">
|
||||
<span class="year">{{ T "widgetArchiveMore" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user