refactor: use relative link for hyperlinks

This commit is contained in:
Jimmy Cai
2020-10-31 23:24:58 +01:00
parent d6b0f10241
commit b5645f0180
8 changed files with 10 additions and 10 deletions
@@ -7,7 +7,7 @@
{{ if and $image.exists $image.resource }}
{{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}}
{{- $20x := $imageRaw.Fill "20x20 smart" -}}
<a href="{{ .Permalink }}"
<a href="{{ .RelPermalink }}"
class="color-tag"
data-image="{{ $20x.RelPermalink }}"
data-key="{{ $context.Slug }}"
@@ -15,14 +15,14 @@
{{ .LinkTitle }}
</a>
{{ else }}
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }}
{{ end }}
</header>
{{ end }}
<h2 class="article-title">
<a href="{{ .Permalink }}">
<a href="{{ .RelPermalink }}">
{{- .Title -}}
</a>
</h2>
@@ -1,7 +1,7 @@
{{ if .Params.Tags }}
<section class="article-tags">
{{ range (.GetTerms "tags") }}
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }}
</section>
{{ end }}