fix(link): fix tags/categories link bug

This commit is contained in:
Dillon
2020-02-21 12:49:55 +08:00
parent a4116f14a7
commit a0f31c35fe
7 changed files with 48 additions and 35 deletions

View File

@@ -35,7 +35,7 @@
<div class="menu" id="menu-mobile">
{{- $currentPage := . -}}
{{- range .Site.Menus.main -}}
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">
<a class="menu-item" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
{{- .Pre | safeHTML }}{{ .Name -}}
</a>
{{- end -}}

View File

@@ -41,9 +41,11 @@
<section>
{{- with .Params.tags -}}
{{- range . -}}
<span class="tag">
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>&nbsp;{{ . }}</a>&nbsp;
</span>
<span>
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
<i class="fas fa-tag fa-fw"></i>{{ . }}
</a>
</span>&nbsp;
{{- end -}}
{{- end -}}
</section>