feat: use relative URL

This commit is contained in:
Hanwen Guo 2023-01-01 17:08:14 +08:00
parent 210f46cbb3
commit 6c52934e93
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
{{- range $item := .collection -}}
<li>
{{- with $item.url -}}
<a href="{{ $item.url }}">{{ safeHTML $item.title }}</a>
<a href="{{ $item.url | relURL }}">{{ safeHTML $item.title }}</a>
{{- else -}}
{{ safeHTML $item.title }}
{{- end -}}

View File

@ -29,11 +29,11 @@
{{- range $post := $posts -}}
<li>
<span>{{- ($post.Date | time.Format site.Params.theme_config.date_format) }}</span>
<a href="{{ $post.Permalink }}">{{ $post.Title }}</a>
<a href="{{ $post.Permalink | relURL }}">{{ $post.Title }}</a>
</li>
{{ end }}
{{- if and .show_more $limit_exceeded }}
<li><a href="{{ .show_more_url }}">{{ .show_more_text | default "Show more..." }}</a></li>
<li><a href="{{ .show_more_url | relURL }}">{{ .show_more_text | default "Show more..." }}</a></li>
{{ end }}
</ul>
{{ end }}