From 1dcf58286d8c81622feeaae4dd91f74b500bff76 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Sun, 9 Mar 2025 11:26:56 +0100 Subject: [PATCH] Make all links non-relative --- hugo.yaml | 2 +- themes/tsc_vfl/layouts/_default/announcements.html | 2 +- themes/tsc_vfl/layouts/_default/archive.html | 2 +- themes/tsc_vfl/layouts/_default/home.html | 4 ++-- themes/tsc_vfl/layouts/_default/list.html | 9 --------- themes/tsc_vfl/layouts/_default/turniermeldungen.html | 2 +- themes/tsc_vfl/layouts/partials/page/banner-images.html | 4 ++-- themes/tsc_vfl/layouts/partials/page/footer.html | 6 +++--- themes/tsc_vfl/layouts/partials/page/head.html | 6 +++--- .../layouts/partials/page/left-announcements.html | 2 +- themes/tsc_vfl/layouts/shortcodes/tsc/link-offers.md | 4 ++-- .../layouts/shortcodes/tsc/news/gallery-image.html | 6 +++--- .../layouts/shortcodes/tsc/news/inline-float.html | 2 +- .../layouts/shortcodes/tsc/news/internal-video.html | 2 +- themes/tsc_vfl/layouts/shortcodes/tsc/press/dld.html | 2 +- themes/tsc_vfl/layouts/shortcodes/tsc/press/img.html | 2 +- themes/tsc_vfl/layouts/shortcodes/tsc/rooms/image.html | 2 +- themes/tsc_vfl/layouts/shortcodes/tsc/trainer.html | 4 ++-- themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html | 4 ++-- 19 files changed, 29 insertions(+), 38 deletions(-) diff --git a/hugo.yaml b/hugo.yaml index 0344833..e861ce0 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -3,7 +3,7 @@ languageCode: de defaultContentLanguage: de title: TSC im VfL Sindelfingen e.V. theme: tsc_vfl -relativeUrls: true +relativeUrls: false sitemap: changeFreq: daily diff --git a/themes/tsc_vfl/layouts/_default/announcements.html b/themes/tsc_vfl/layouts/_default/announcements.html index 10d1450..3ae5c2a 100644 --- a/themes/tsc_vfl/layouts/_default/announcements.html +++ b/themes/tsc_vfl/layouts/_default/announcements.html @@ -6,7 +6,7 @@
{{ $announcements := partial "get-announcement-list" . }} {{ range $announcements }} - {{ $urlBlogEntry := .RelPermalink}} + {{ $urlBlogEntry := .Permalink}}
{{ (time.AsTime .Params.announcement.date).Format "02.01.2006" }} diff --git a/themes/tsc_vfl/layouts/_default/archive.html b/themes/tsc_vfl/layouts/_default/archive.html index a6b4ecf..0c21f79 100644 --- a/themes/tsc_vfl/layouts/_default/archive.html +++ b/themes/tsc_vfl/layouts/_default/archive.html @@ -15,7 +15,7 @@
{{ .Date.Format "02.01.2006" }}
diff --git a/themes/tsc_vfl/layouts/_default/home.html b/themes/tsc_vfl/layouts/_default/home.html index 0cea6e0..7a6377d 100644 --- a/themes/tsc_vfl/layouts/_default/home.html +++ b/themes/tsc_vfl/layouts/_default/home.html @@ -4,7 +4,7 @@
{{ range (.Paginate (first 30 ( where .Site.RegularPages "Section" "==" "news")) 10 ).Pages }} - {{ $urlBlogEntry := .RelPermalink}} + {{ $urlBlogEntry := .Permalink}}
{{ .Date.Format "02.01.2006" }} @@ -21,7 +21,7 @@ {{/* {{ with ($resImage).Fit "290x190 webp" }} */}} {{ with $resImage }} - + {{ end }} {{ end }} diff --git a/themes/tsc_vfl/layouts/_default/list.html b/themes/tsc_vfl/layouts/_default/list.html index b0eabab..3c5215c 100644 --- a/themes/tsc_vfl/layouts/_default/list.html +++ b/themes/tsc_vfl/layouts/_default/list.html @@ -3,14 +3,5 @@

{{ .Title }}

{{ .Content }} - {{ partial "totop" }} {{ end }} diff --git a/themes/tsc_vfl/layouts/_default/turniermeldungen.html b/themes/tsc_vfl/layouts/_default/turniermeldungen.html index a329db9..0f87d32 100644 --- a/themes/tsc_vfl/layouts/_default/turniermeldungen.html +++ b/themes/tsc_vfl/layouts/_default/turniermeldungen.html @@ -17,7 +17,7 @@ {{ end }} diff --git a/themes/tsc_vfl/layouts/partials/page/banner-images.html b/themes/tsc_vfl/layouts/partials/page/banner-images.html index b37ee0b..64d76af 100644 --- a/themes/tsc_vfl/layouts/partials/page/banner-images.html +++ b/themes/tsc_vfl/layouts/partials/page/banner-images.html @@ -3,10 +3,10 @@ {{- range $images }} {{- $img := .Fit "1220x340 webp" -}} {{ if $first }} - + {{ $first = false }} {{ end }} - + {{ end -}}
{{- $count := (len $images) -}} diff --git a/themes/tsc_vfl/layouts/partials/page/footer.html b/themes/tsc_vfl/layouts/partials/page/footer.html index 2eb1ba1..1282a2c 100644 --- a/themes/tsc_vfl/layouts/partials/page/footer.html +++ b/themes/tsc_vfl/layouts/partials/page/footer.html @@ -3,9 +3,9 @@
diff --git a/themes/tsc_vfl/layouts/partials/page/head.html b/themes/tsc_vfl/layouts/partials/page/head.html index c0a3120..7136e09 100644 --- a/themes/tsc_vfl/layouts/partials/page/head.html +++ b/themes/tsc_vfl/layouts/partials/page/head.html @@ -14,7 +14,7 @@ {{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "transpiler" "dartsass") }} {{ $scss := resources.Get "css/main.scss" | css.Sass $options }} {{ if hugo.IsProduction }}{{ $scss = $scss | minify | fingerprint }}{{ end }} - + {{ $title := print .Site.Title " | " .Title }} {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} {{ $title }} @@ -22,8 +22,8 @@ {{ $galleryJs := resources.Get "js/gallery.js" }} {{ if hugo.IsProduction }}{{ $galleryJs = $galleryJs | minify | fingerprint }}{{ end }} - + {{ $mailsJs := resources.Get "js/mails.js" }} {{ if hugo.IsProduction }}{{ $mailsJs = $mailsJs | minify | fingerprint }}{{ end }} - + diff --git a/themes/tsc_vfl/layouts/partials/page/left-announcements.html b/themes/tsc_vfl/layouts/partials/page/left-announcements.html index ab26d5a..64a5d87 100644 --- a/themes/tsc_vfl/layouts/partials/page/left-announcements.html +++ b/themes/tsc_vfl/layouts/partials/page/left-announcements.html @@ -1,7 +1,7 @@ {{ $announcements := partial "get-announcement-list" . }}
{{ range $announcements }} - {{ $urlBlogEntry := .RelPermalink}} + {{ $urlBlogEntry := .Permalink}}
{{ (time.AsTime .Params.announcement.date).Format "02.01.2006" }} diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/link-offers.md b/themes/tsc_vfl/layouts/shortcodes/tsc/link-offers.md index 456b2ef..a107e1f 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/link-offers.md +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/link-offers.md @@ -1,7 +1,7 @@ ## Trainingsorte -siehe [Standorte]({{ relref $.Page "raeume" }}) +siehe [Standorte]({{ ref $.Page "raeume" }}) ## Beitrag -siehe [Mitgliedschaft]({{ relref $.Page "beitrag" }}) +siehe [Mitgliedschaft]({{ ref $.Page "beitrag" }}) diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/news/gallery-image.html b/themes/tsc_vfl/layouts/shortcodes/tsc/news/gallery-image.html index 4367657..6cdaa04 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/news/gallery-image.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/news/gallery-image.html @@ -17,12 +17,12 @@ {{ with $.Get "href" }} href="{{ . }}" {{ else }} - data-url="{{ $imgFitted.RelPermalink }}" + data-url="{{ $imgFitted.Permalink }}" {{ end }} > {{ with $.Get "credits" }} @@ -34,4 +34,4 @@ {{ else }} {{ warnf "No image found for page %s: %s" .Page.RelPermalink (.Get "src") }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html b/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html index 688e2fb..a02d1c7 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html @@ -9,7 +9,7 @@ {{ if not $resource }} {{ $resource = resources.GetMatch $filename }} {{ end }} - src="{{ $resource.RelPermalink }}" + src="{{ $resource.Permalink }}" > {{ with .Get "href" }} diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/news/internal-video.html b/themes/tsc_vfl/layouts/shortcodes/tsc/news/internal-video.html index c908229..38d6315 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/news/internal-video.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/news/internal-video.html @@ -6,6 +6,6 @@ class="internal-video" > diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/press/dld.html b/themes/tsc_vfl/layouts/shortcodes/tsc/press/dld.html index 844489d..1573f4c 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/press/dld.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/press/dld.html @@ -2,6 +2,6 @@ {{ .Get "url"}}{{ page.Resources}} --> {{ $res := .Page.Resources.GetMatch (.Get "url") }} - + {{ .Inner }} diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/press/img.html b/themes/tsc_vfl/layouts/shortcodes/tsc/press/img.html index 9972683..74a7aa6 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/press/img.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/press/img.html @@ -7,5 +7,5 @@ -->
{{- $res := .Page.Resources.GetMatch (.Get "src") -}} - +
diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/rooms/image.html b/themes/tsc_vfl/layouts/shortcodes/tsc/rooms/image.html index fc22a6b..a4e73f9 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/rooms/image.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/rooms/image.html @@ -1,4 +1,4 @@
{{ $resource := .Page.Resources.GetMatch (.Get "image") }} - +
diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/trainer.html b/themes/tsc_vfl/layouts/shortcodes/tsc/trainer.html index 49fe74e..0fd6e33 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/trainer.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/trainer.html @@ -3,10 +3,10 @@ {{ $imageName := .Params.image }} {{ $image := "" }} {{ with .Resources.GetMatch $imageName}} - {{ $image = (.Fit "60x80 webp").RelPermalink }} + {{ $image = (.Fit "60x80 webp").Permalink }} {{ else }} {{ with .Resources.ByType "image" }} - {{ $image = ((index . 0).Fit "60x80 webp").RelPermalink }} + {{ $image = ((index . 0).Fit "60x80 webp").Permalink }} {{ warnf "Image for %s is not correclty found. Falling back to first found image in page resources." ($.Get "name") }} {{ else }} {{ with .Params.sex }} diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html b/themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html index 7115eec..a5cd970 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html @@ -3,11 +3,11 @@ {{ $imageName := .Params.image }} {{ $image := "" }} {{ with (.Resources.GetMatch $imageName) }} - {{ $image = (.Fit "60x80 webp").RelPermalink }} + {{ $image = (.Fit "60x80 webp").Permalink }} {{ else }} {{ warnf "Image for %s is not correclty found. Falling back to default." ($.Get "name") }} {{ with (.Resources.ByType "image") }} - {{ $image = ((index . 0).Fit "60x80 webp").RelPermalink }} + {{ $image = ((index . 0).Fit "60x80 webp").Permalink }} {{ else }} {{ with .Params.sex }} {{ if eq . "male" }}