Browse Source
Since capitalizeListTitles is disabled, the title of the term page
depended on the first page processed by Hugo ("keycloak" or "Keycloak").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNHsWYTXPThURz6TbVS1j3
master
8 changed files with 3 additions and 60 deletions
@ -1,11 +0,0 @@ |
|||
<!-- This shortcode renders an HTML figure based on a page resource --> |
|||
{{- $filename := .Get "src" -}} |
|||
{{- $image := .Page.Resources.GetMatch (printf "%s" $filename) -}} |
|||
<figure> |
|||
<img src="{{ $image.RelPermalink }}" alt="{{- .Get "title" | plainify -}}"> |
|||
{{- with .Get "title" }} |
|||
<figcaption> |
|||
{{- . | markdownify -}} |
|||
</figcaption> |
|||
{{- end }} |
|||
</figure> |
|||
@ -1,7 +0,0 @@ |
|||
<!-- This shortcode renders an code block prefixed by a filename --> |
|||
<div class="highlightedFile"> |
|||
{{- with .Get 0 -}} |
|||
<div class="filename">{{ printf (i18n "file") . | safeHTML }}</div> |
|||
{{- end -}} |
|||
{{- highlight (trim .Inner "\n") (.Get 1) (.Get 2) -}} |
|||
</div> |
|||
@ -1,7 +0,0 @@ |
|||
<!-- This shortcode renders an code block prefixed by a filename --> |
|||
<div class="highlightedFile"> |
|||
{{- with .Get 0 -}} |
|||
<div class="filename">{{ . | safeHTML }}</div> |
|||
{{- end -}} |
|||
{{- highlight (trim .Inner "\n") (.Get 1) (.Get 2) -}} |
|||
</div> |
|||
@ -1,26 +0,0 @@ |
|||
{{- /* |
|||
-- This shortcode generates the HTML link to an internal resource, which can be translated or not. |
|||
-- It displays a country flag when the target page is in a different language than the current page. |
|||
-- Currently, this shortcode can only handle Hugo sites with two languages. |
|||
-- |
|||
-- The output must not contain any extra whitespace since the link is |
|||
-- usually embedded in a sentence. |
|||
*/ -}} |
|||
{{- $path := .Get "path" -}} |
|||
{{- $currentLang := .Page.Lang -}} |
|||
{{- $title := .Get "title" -}} |
|||
{{- $sites := hugo.Sites -}} |
|||
{{- if ne $currentLang (index hugo.Sites 0).Language.Lang -}} |
|||
{{- $sites = collections.Reverse hugo.Sites -}} |
|||
{{- end -}} |
|||
{{- range $sites -}} |
|||
{{- with .GetPage $path -}} |
|||
<a href="{{ .RelPermalink }}">{{ or $title .Title }}</a> |
|||
{{- if and (eq $currentLang "en") (eq .Lang "fr") }} {{ partial "icons/fr.svg" . | strings.TrimSpace | safeHTML }}{{ end -}} |
|||
{{- if eq $currentLang "fr" -}} |
|||
{{- partial "lang-detection.html" . -}} |
|||
{{- if .Store.Get "en_article_in_fr_site" }} {{ partial "icons/en.svg" . | strings.TrimSpace | safeHTML }}{{ end -}} |
|||
{{- end -}} |
|||
{{- break -}} |
|||
{{- end -}} |
|||
{{- end -}} |
|||
@ -1,6 +0,0 @@ |
|||
<!-- This shortcode renders an image linked to a resource somewhere --> |
|||
{{- $filename := .Get "src" -}} |
|||
{{- $image := .Page.Resources.GetMatch (printf "%s" $filename) -}} |
|||
<a href="{{- .Get "href" | plainify -}}"> |
|||
<img src="{{ $image.RelPermalink }}"> |
|||
</a> |
|||
Loading…
Reference in new issue