Update links to relative permalinks

This commit is contained in:
Gabriel Arazas 2023-05-03 15:39:51 +08:00
parent 6d6ab217c1
commit e75ecbb866
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@
{{- range .Pages -}}
<li class="post--list">
<date class="post--list__date">{{ .PublishDate.Format "2006-01-02" }}</date>
<a class="post--list__title" aria-label="{{ .Title }}" href="{{ .Permalink }}">{{ .Title }}</a>
<a class="post--list__title" aria-label="{{ .Title }}" href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{- end -}}
</ul>

View File

@ -3,13 +3,13 @@
{{- if hugo.IsProduction }}
{{ $highlighter = $highlighter | resources.Minify | resources.Fingerprint }}
{{ end }}
<link rel="stylesheet" href="{{ $highlighter.Permalink }}"/>
<link rel="stylesheet" href="{{ $highlighter.RelPermalink }}"/>
{{ $asciidoctorTabs := resources.Get "css/asciidoctor-tabs.css" | resources.ToCSS }}
<link rel="stylesheet" href="{{ $asciidoctorTabs.Permalink }}"/>
<link rel="stylesheet" href="{{ $asciidoctorTabs.RelPermalink }}"/>
{{ $asciidoctorTabsJS := resources.Get "js/asciidoctor-tabs.js" }}
<script defer src="{{ $asciidoctorTabsJS.Permalink }}"></script>
<script defer src="{{ $asciidoctorTabsJS.RelPermalink }}"></script>
{{- /* medium-zoom */ -}}
<script defer src="https://cdn.jsdelivr.net/npm/medium-zoom@1.0.7/dist/medium-zoom.min.js"></script>

View File

@ -14,7 +14,7 @@ Otherwise, we take the pages of a section. */ -}}
{{- range $paginator.Pages }}
<article class="post--list">
<time class="post--list__date" datetime="{{ .PublishDate.Format "2006-01-02" }}">{{ .PublishDate.Format "2006-01-02" }}</time>
<a class="post--list__title" href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
<a class="post--list__title" href="{{ .RelPermalink | relURL }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
</article>
{{- end }}
</main>