Skip to content

Commit 92ba9ef

Browse files
committed
refactor: Make absURL and site.Params consistent
1 parent 42656bf commit 92ba9ef

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

layouts/404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{{- define "main" }}
22
<article class="content">
33
<header>
4-
<h1 class="post-title">404 — {{ $.Site.Params.missingContentMessage | default "Page not found..." }}</h1>
4+
<h1 class="post-title">404 — {{ site.Params.missingContentMessage | default "Page not found..." }}</h1>
55
</header>
66
<p>
7-
<a href="{{ "/" | absURL }}">{{ $.Site.Params.missingBackButtonLabel | default "Back to home page" }}&nbsp;→</a>
7+
<a href="{{ absURL "" }}">{{ site.Params.missingBackButtonLabel | default "Back to home page" }}&nbsp;→</a>
88
</p>
99
</article>
1010
{{- end }}

layouts/_default/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
3434
</header>
3535

3636
{{- if .Params.Cover }}
37-
<img src="{{ .Params.Cover | absURL }}" class="post-cover" {{ with .Params.CoverAlt }}alt="{{ . | plainify }}"{{ end }} />
37+
<img src="{{ absURL .Params.Cover }}" class="post-cover" {{ with .Params.CoverAlt }}alt="{{ . | plainify }}"{{ end }} />
3838
{{- end }}
3939

4040
{{- if and (.Param "toc") (ne .TableOfContents "<nav id=\"TableOfContents\"></nav>") }}

layouts/partials/head/style.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111

1212
{{- /* Custom CSS to override theme properties (/static/style.css) */}}
1313
{{- if (fileExists "static/style.css") }}
14-
<link rel="stylesheet" href="{{ "style.css" | absURL }}" />
14+
<link rel="stylesheet" href="{{ absURL "style.css" }}" />
1515
{{- end }}

0 commit comments

Comments
 (0)