mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-01-30 16:57:58 +00:00
Fix translation links
This commit is contained in:
parent
664e5c3928
commit
143341838d
@ -26,6 +26,11 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version
|
||||
** `$.Site.Author` has been deprecated and instead uses the `$.Site.Params.author` instead.
|
||||
|
||||
|
||||
=== Fixed
|
||||
|
||||
* Update translation links template.
|
||||
|
||||
|
||||
|
||||
|
||||
== [0.7.1] - 2024-10-28
|
||||
|
@ -50,10 +50,10 @@
|
||||
{{- $langs := slice }}
|
||||
{{- range .Translations }}
|
||||
{{- $lang := cond (ne .Language.LanguageName nil) .Language.LanguageName .Lang }}
|
||||
{{ $lang_links = $lang_links | append (printf "<a href=%s>%s</a>" .RelPermalink $lang) }}
|
||||
{{ $lang_links = $lang_links | append (printf "<a href=\"%s\">%s</a>" .RelPermalink $lang) }}
|
||||
{{ $langs = $langs | append $lang }}
|
||||
{{- end }}
|
||||
<p data-content-translations="{{ jsonify $langs }}">{{ i18n "available_translations" }}: {{ delimit $lang_links "," (printf " %s " (i18n "and")) }}</p>
|
||||
<p data-content-translations="{{ jsonify $langs }}">{{ i18n "available_translations" }}: {{ delimit $lang_links "," (printf " %s " (i18n "and")) | safeHTML }}</p>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user