Back to Genai Toolbox

Compatible Sources

.hugo/layouts/shortcodes/compatible-sources.html

1.1.0982 B
Original Source

{{/* Automatically identify the "Native" source (Grandparent source.md, since this is strictly used inside tools/) */}} {{ $nativeSource := .Page.Parent.Parent.GetPage "source.md" }} {{ if not $nativeSource }} {{ $nativeSource = .Page.Parent.Parent.GetPage "source" }} {{ end }}

This tool can be used with the following database sources:

Source Name
{{/* Display the Native Source automatically */}} {{ if $nativeSource }}
{{ end }} {{/* Process additional sources passed via the "others" parameter */}} {{ $others := .Get "others" }} {{ if $others }} {{ range split $others "," }} {{ $path := trim . " " }} {{ $cleanPath := trim $path "/" }} {{ $remotePage := site.GetPage (printf "%s/source.md" $cleanPath) }} {{ if $remotePage }}
{{ else }}
{{ end }} {{ end }} {{ end }}