fix: replace .Site.BaseURL by recommended alternatives (#487)

This commit is contained in:
Robert Kaussow 2024-01-15 21:15:17 +01:00 committed by GitHub
parent 4b94d6ec14
commit 785adf091b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 8 deletions

View File

@ -109,7 +109,7 @@ enableRobotsTXT = true
# by the 'img' shortcode. # by the 'img' shortcode.
geekblogImageLazyLoading = true geekblogImageLazyLoading = true
# (Optional, default false) Set HTMl <base> to .Site.BaseURL if enabled. It might be required # (Optional, default false) Set HTMl <base> to .Site.Home.Permalink if enabled. It might be required
# if a subdirectory is used within Hugo's BaseURL. # if a subdirectory is used within Hugo's BaseURL.
# See https://developer.mozilla.org/de/docs/Web/HTML/Element/base. # See https://developer.mozilla.org/de/docs/Web/HTML/Element/base.
geekblogOverwriteHTMLBase = false geekblogOverwriteHTMLBase = false
@ -249,7 +249,7 @@ params:
# by the 'img' shortcode. # by the 'img' shortcode.
geekblogImageLazyLoading: true geekblogImageLazyLoading: true
# (Optional, default false) Set HTMl <base> to .Site.BaseURL if enabled. It might be required # (Optional, default false) Set HTMl <base> to .Site.Home.Permalink if enabled. It might be required
# if a subdirectory is used within Hugo's BaseURL. # if a subdirectory is used within Hugo's BaseURL.
# See https://developer.mozilla.org/de/docs/Web/HTML/Element/base. # See https://developer.mozilla.org/de/docs/Web/HTML/Element/base.
geekblogOverwriteHTMLBase: false geekblogOverwriteHTMLBase: false

View File

@ -21,7 +21,7 @@
<div class="gblog-error__line gblog-error__code">Error 404</div> <div class="gblog-error__line gblog-error__code">Error 404</div>
<div class="gblog-error__line gblog-error__help"> <div class="gblog-error__line gblog-error__help">
Seems like what you are looking for can't be found. Don't worry we can bring you back Seems like what you are looking for can't be found. Don't worry we can bring you back
to the <a class="gblog-error__link" href="{{ .Site.BaseURL }}">homepage</a>. to the <a class="gblog-error__link" href="{{ .Site.Home.Permalink }}">homepage</a>.
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,7 +8,7 @@
{{- with .Site.Params.subtitle }} {{- with .Site.Params.subtitle }}
"description": {{ . | jsonify }}, "description": {{ . | jsonify }},
{{- end }} {{- end }}
"home_page_url" : "{{ .Site.BaseURL }}", "home_page_url" : "{{ .Site.Home.Permalink }}",
{{- with .OutputFormats.Get "json" }} {{- with .OutputFormats.Get "json" }}
"feed_url" : "{{ .Permalink }}", "feed_url" : "{{ .Permalink }}",
{{- end }} {{- end }}

View File

@ -79,7 +79,7 @@
{{- end }} {{- end }}
{{- if (default false $.Site.Params.geekblogOverwriteHTMLBase) }} {{- if (default false $.Site.Params.geekblogOverwriteHTMLBase) }}
<base href="{{ .Site.BaseURL }}" /> <base href="{{ .Site.Home.Permalink }}" />
{{- end }} {{- end }}
{{ printf "<!-- %s -->" "Made with Geekblog theme https://github.com/thegeeklab/hugo-geekblog" | safeHTML }} {{ printf "<!-- %s -->" "Made with Geekblog theme https://github.com/thegeeklab/hugo-geekblog" | safeHTML }}

View File

@ -7,7 +7,7 @@
{{ with index $.Site.Data.authors . }}"author": "{{ .name }}",{{ end }} {{ with index $.Site.Data.authors . }}"author": "{{ .name }}",{{ end }}
{{- end }} {{- end }}
"name": {{ .Site.Title }}, "name": {{ .Site.Title }},
"url": {{ .Site.BaseURL }}, "url": {{ .Site.Home.Permalink }},
{{- with partial "utils/description" . }} {{- with partial "utils/description" . }}
"description": "{{ . | plainify | htmlUnescape | chomp }}", "description": "{{ . | plainify | htmlUnescape | chomp }}",
{{- end }} {{- end }}
@ -77,7 +77,7 @@
"publisher":{ "publisher":{
"@type":"Organization", "@type":"Organization",
"name": {{ .Site.Title }}, "name": {{ .Site.Title }},
"url": {{ .Site.BaseURL }}, "url": {{ .Site.Home.Permalink }},
"logo": { "logo": {
"@type": "ImageObject", "@type": "ImageObject",
"url": {{ (default "brand.svg" .Site.Params.logo) | absURL }}, "url": {{ (default "brand.svg" .Site.Params.logo) | absURL }},

View File

@ -2,7 +2,7 @@
<div class="container flex flex-wrap"> <div class="container flex flex-wrap">
<div class="gblog-header__col-1 flex justify-start hidden-mobile"></div> <div class="gblog-header__col-1 flex justify-start hidden-mobile"></div>
<div class="gblog-header__col-2 flex align-center justify-center "> <div class="gblog-header__col-2 flex align-center justify-center ">
<a class="gblog-header__link" rel="me" href="{{ .Site.BaseURL }}"> <a class="gblog-header__link" rel="me" href="{{ .Site.Home.Permalink }}">
<span class="gblog-brand flex align-center justify-center"> <span class="gblog-brand flex align-center justify-center">
<img <img
class="gblog-brand__img" class="gblog-brand__img"