Fix a URL

This commit is contained in:
JP Hastings-Spital 2024-03-31 23:41:15 +01:00
parent af6fef217b
commit eeb97d3581
2 changed files with 3 additions and 2 deletions

View file

@ -6,7 +6,7 @@ category:
- games
- emulation
- web
bookmarkOf: https://tenmile.quote.games/
bookmarkOf: https://tenmile.quote.games
references:
bookmark:
url: https://tenmile.quote.games

View file

@ -11,10 +11,11 @@
{{- $page := . -}}
{{- $url := .Params.bookmarkOf -}}
{{- $hostname := ($url | urls.Parse).Hostname -}}
{{- $reference := partial "reference.obj" (dict "url" $url "page" $page) -}}
{{ partial "svg.html" (dict "name" "message") }} Thoughts on{{" "}}
{{- with $reference.name -}}
the {{ partial "partials/article-type.html" (default "article" $reference.type) }} {{ partial "rich-link.html" (dict "Class" "u-bookmark-of" "Destination" $url "Text" . "Page" $page) }}
{{- else -}}
{{ partial "rich-link.html" (dict "Class" "u-bookmark-of" "Destination" $url "Text" (printf "an article from %s" (($url | urls.Parse).Hostname)) "Page" $page) }}
{{ partial "rich-link.html" (dict "Class" "u-bookmark-of" "Destination" $url "Text" (printf "an article from %s" $hostname) "Page" $page) }}
{{- end }}