diff options
author | Oscar Najera <hi@oscarnajera.com> | 2023-10-30 00:20:32 +0100 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2023-10-30 00:20:32 +0100 |
commit | 4c306311fd532aeb5a9c5e27f2aa3f5533cf8ad4 (patch) | |
tree | bff05878f3882e8ef7dbcd21eaf4389b97b2ec6d | |
parent | 101bbe9ec5b1c19b586b7a33feb74751cdd9e7b9 (diff) | |
download | hugo-minimalist-theme-4c306311fd532aeb5a9c5e27f2aa3f5533cf8ad4.tar.gz hugo-minimalist-theme-4c306311fd532aeb5a9c5e27f2aa3f5533cf8ad4.tar.bz2 hugo-minimalist-theme-4c306311fd532aeb5a9c5e27f2aa3f5533cf8ad4.zip |
Improve relative links
-rw-r--r-- | layouts/404.html | 2 | ||||
-rw-r--r-- | layouts/partials/image-gallery.html | 4 | ||||
-rw-r--r-- | layouts/partials/metadata.html | 18 | ||||
-rw-r--r-- | layouts/taxonomy/terms.html | 2 |
4 files changed, 14 insertions, 12 deletions
diff --git a/layouts/404.html b/layouts/404.html index 8855dfb..c375edb 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -25,7 +25,7 @@ <i class="far fa-calendar"></i> {{ .Date.Format $dateFormat }} </time> - <a class="link dim color-inherit" href="{{ .Permalink }}"> + <a class="link dim color-inherit" href="{{ .RelPermalink }}"> {{ .Title }} </a> </li> diff --git a/layouts/partials/image-gallery.html b/layouts/partials/image-gallery.html index d3a5fae..943370c 100644 --- a/layouts/partials/image-gallery.html +++ b/layouts/partials/image-gallery.html @@ -12,13 +12,13 @@ /> <img class="gallery__img" - src="{{ (.Fill "1152x768").Permalink }}" + src="{{ (.Fill "1152x768").RelPermalink }}" alt="" loading="lazy" /> <label for="img-{{ $id }}" class="gallery__thumb"> <img - src="{{ (.Fill "150x100").Permalink }}" + src="{{ (.Fill "150x100").RelPermalink }}" alt="" loading="lazy" /> diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index fdbb504..7756667 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -21,25 +21,27 @@ | {{ .ReadingTime }} mins read {{ end }} - {{ with .Params.tags }} + {{ with .GetTerms "tags" }} | - <a href="/tags" class="link grow w3-text-theme ph1"> + <a href="/tags" class="link w3-text-theme ph1"> <i class="fas fa-tags"></i> </a> {{ range . }} - {{ $href := print (absURL "tags/") (urlize .) }} - <a class="link underline color-inherit" href="{{ $href }}">{{ . }}</a> + <a class="link underline color-inherit" href="{{ .RelPermalink }}" + >{{ .Title }}</a + > {{ end }} {{ end }} - {{ with .Params.categories }} + {{ with .GetTerms "categories" }} | - <a href="/categories" class="link grow w3-text-theme ph1"> + <a href="/categories" class="link w3-text-theme ph1"> <i class="fas fa-folder-open"></i> </a> {{ range . }} - {{ $href := print (absURL "categories/") (urlize .) }} - <a class="underline color-inherit" href="{{ $href }}">{{ . }}</a> + <a class="link underline color-inherit" href="{{ .RelPermalink }}" + >{{ .Title }}</a + > {{ end }} {{ end }} </p> diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html index 75efd98..347e4a5 100644 --- a/layouts/taxonomy/terms.html +++ b/layouts/taxonomy/terms.html @@ -40,7 +40,7 @@ <i class="far fa-calendar"></i> {{ .Date.Format $dateFormat }} </time> - <a class="link dim color-inherit" href="{{ .Permalink }}"> + <a class="link dim color-inherit" href="{{ .RelPermalink }}"> {{ .Title }} </a> </li> |