Initial commit: Rapport Website (Hugo + Hextra)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{{/*
|
||||
Returns the language direction using the supported Hugo API for the running version.
|
||||
|
||||
Hugo v0.158.0 deprecated Language.LanguageDirection in favor of Language.Direction.
|
||||
Keep the fallback so Hextra can continue supporting Hugo >= 0.146.0.
|
||||
*/}}
|
||||
{{- $language := . -}}
|
||||
{{- $direction := "" -}}
|
||||
{{- if ge (hugo.Version) "0.158.0" -}}
|
||||
{{- $direction = $language.Direction -}}
|
||||
{{- else -}}
|
||||
{{- $direction = $language.LanguageDirection -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $direction -}}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{/*
|
||||
Returns the language label using the supported Hugo API for the running version.
|
||||
|
||||
Hugo v0.158.0 deprecated Language.LanguageName in favor of Language.Label.
|
||||
Keep the fallback so Hextra can continue supporting Hugo >= 0.146.0.
|
||||
*/}}
|
||||
{{- $language := . -}}
|
||||
{{- $label := "" -}}
|
||||
{{- if ge (hugo.Version) "0.158.0" -}}
|
||||
{{- $label = $language.Label -}}
|
||||
{{- else -}}
|
||||
{{- $label = $language.LanguageName -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $label -}}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{/*
|
||||
Returns the language locale using the supported Hugo API for the running version.
|
||||
|
||||
Hugo v0.158.0 deprecated Language.LanguageCode in favor of Language.Locale.
|
||||
Keep the fallback so Hextra can continue supporting Hugo >= 0.146.0.
|
||||
*/}}
|
||||
{{- $language := . -}}
|
||||
{{- $locale := "" -}}
|
||||
{{- if ge (hugo.Version) "0.158.0" -}}
|
||||
{{- $locale = $language.Locale -}}
|
||||
{{- else -}}
|
||||
{{- $locale = $language.LanguageCode -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $locale -}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{/*
|
||||
Returns site data using the supported Hugo API for the running version.
|
||||
|
||||
Hugo v0.156.0 deprecated site.Data / .Site.Data in favor of hugo.Data.
|
||||
Keep the fallback so Hextra can continue supporting Hugo >= 0.146.0.
|
||||
*/}}
|
||||
{{- $siteData := dict -}}
|
||||
{{- if ge (hugo.Version) "0.156.0" -}}
|
||||
{{- $siteData = hugo.Data -}}
|
||||
{{- else -}}
|
||||
{{- $siteData = site.Data -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $siteData -}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{/*
|
||||
Returns all sites using the supported Hugo API for the running version.
|
||||
|
||||
Hugo v0.156.0 deprecated site.Sites / page.Sites in favor of hugo.Sites.
|
||||
Keep the fallback so Hextra can continue supporting Hugo >= 0.146.0.
|
||||
*/}}
|
||||
{{- $sites := slice -}}
|
||||
{{- if ge (hugo.Version) "0.156.0" -}}
|
||||
{{- $sites = hugo.Sites -}}
|
||||
{{- else -}}
|
||||
{{- $sites = site.Sites -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $sites -}}
|
||||
Reference in New Issue
Block a user