Make all links non-relative

This commit is contained in:
2025-03-09 11:26:56 +01:00
parent 1340c77a2f
commit 1dcf58286d
19 changed files with 29 additions and 38 deletions

View File

@@ -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" }})

View File

@@ -17,12 +17,12 @@
{{ with $.Get "href" }}
href="{{ . }}"
{{ else }}
data-url="{{ $imgFitted.RelPermalink }}"
data-url="{{ $imgFitted.Permalink }}"
{{ end }}
>
<img
{{ with $.Get "alt"}}alt="{{.}}"{{ end }}
src="{{ $img.RelPermalink }}"
src="{{ $img.Permalink }}"
>
</a>
{{ with $.Get "credits" }}
@@ -34,4 +34,4 @@
</figure>
{{ else }}
{{ warnf "No image found for page %s: %s" .Page.RelPermalink (.Get "src") }}
{{ end }}
{{ end }}

View File

@@ -9,7 +9,7 @@
{{ if not $resource }}
{{ $resource = resources.GetMatch $filename }}
{{ end }}
src="{{ $resource.RelPermalink }}"
src="{{ $resource.Permalink }}"
>
{{ with .Get "href" }}
</a>

View File

@@ -6,6 +6,6 @@ class="internal-video"
>
<source
{{ with .Get "type" }}type="{{ . }}"{{ end }}
src="{{ (.Page.Resources.GetMatch (.Get "src")).RelPermalink }}"
src="{{ (.Page.Resources.GetMatch (.Get "src")).Permalink }}"
>
</video>

View File

@@ -2,6 +2,6 @@
{{ .Get "url"}}{{ page.Resources}}
-->
{{ $res := .Page.Resources.GetMatch (.Get "url") }}
<a target="_blank" class="download press-download" href="{{ $res.RelPermalink }}">
<a target="_blank" class="download press-download" href="{{ $res.Permalink }}">
{{ .Inner }}
</a>

View File

@@ -7,5 +7,5 @@
-->
<div class="press-img">
{{- $res := .Page.Resources.GetMatch (.Get "src") -}}
<img{{ with .Get "alt" }} alt="{{ . }}"{{ end }} src="{{ $res.RelPermalink }}">
<img{{ with .Get "alt" }} alt="{{ . }}"{{ end }} src="{{ $res.Permalink }}">
</div>

View File

@@ -1,4 +1,4 @@
<div class="image">
{{ $resource := .Page.Resources.GetMatch (.Get "image") }}
<img src="{{ $resource.RelPermalink}} ">
<img src="{{ $resource.Permalink}} ">
</div>

View File

@@ -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 }}

View File

@@ -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" }}