Skip to content

Commit

Permalink
#1 tag and categories from home page and meta details now absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-mccarthy committed Aug 25, 2024
1 parent 2249519 commit 42bb91a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/postMeta.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{{ with .Params.categories }}<span><strong>in</strong></span>{{ end }}
{{ range $key, $value := .Params.categories -}}
{{- if $key }}, {{ end }}
<a href="{{ "/categories/" | relLangURL }}{{ $value | urlize }}">{{ . }}</a>
<a href="{{ "/categories/" | absLangURL }}{{ $value | urlize }}">{{ . }}</a>
{{- end }}
{{ with .Params.tags }}
<div>
<span>Tags:</span>
{{ range $key, $value := . }}
{{- if $key }}, {{ end }}
<a href="{{ "/tags/" | relLangURL }}{{ $value | urlize }}">{{ . }}</a>
<a href="{{ "/tags/" | absLangURL }}{{ $value | urlize }}">{{ . }}</a>
{{- end }}
</div>
{{ end }}
Expand Down
6 changes: 4 additions & 2 deletions layouts/partials/postMetaDetailed.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
{{ with .Params.categories }}<span>in</span>{{ end }}
{{ range $key, $value := .Params.categories -}}
{{- if $key }}, {{ end }}
<a href="{{ .Site.BaseURL }}/categories/{{ $value }}">{{ . }}</a>
<a href="{{ "/categories/" | absLangURL }}{{ $value | urlize }}">{{ . }}</a>
{{- end }}
</strong>
<!-- {{ with .WordCount }}<span> • {{ . }} words</span>{{ end }} -->
<!-- {{ with .ReadingTime}}<span> • {{ . }} minute read</span>{{ end }} -->
{{ if and .IsPage (ne .Date .Lastmod) }}
<div>
Last updated on
Expand All @@ -19,7 +21,7 @@
<span>Tags:</span>
{{ range $key, $value := . }}
{{- if $key }}, {{ end }}
<a href="{{ $key | relURL }}/{{ $value | urlize }}">{{ . }}</a>
<a href="{{ "/tags/" | absLangURL }}{{ $value | urlize }}">{{ . }}</a>
{{- end }}
</div>
{{ end }}
Expand Down

0 comments on commit 42bb91a

Please sign in to comment.