{{/* Self-describing markdown document for a variant, for the methoden-set tool (methoden-set/, see the Methoden-Set chapter on the project website). Shared by varianten/single.md (own variant URL) and _default/single.md (method URL, when the method has exactly one variant - the same "one variant -> embed" logic as _default/single.html, see there) - methods with only one variant otherwise have no URL usable via the tool, because their HTML page embeds the variant text directly, without showing a visible link to the actual variant URL. Deliberately ONLY a minimal YAML header (titel, quelle) - the client only needs the title from it for the sort list and the source as a validation anchor; authors/ license/origin are instead written as readable text directly into the body (a prose citation at the end), no second metadata structure to parse in JS needed for that - assembly happens here in Hugo, not in the client. Fields/order follow partials/steckbrief-box.html and partials/diese-variante.html, just rendered as markdown instead of HTML. Called with the respective variant as context. */}} {{- $variante := . -}} {{- $methode := partial "methode-fuer-variante.html" . -}} {{- $methodenTitel := "" -}} {{- with $methode }}{{ $methodenTitel = (.Params.titel | default .Title) }}{{ end -}} {{- $titel := printf "%s – %s" $methodenTitel $variante.Params.untertitel -}} {{/* Embedded images (![](datei.svg)) are still relative in the raw markdown - unlike .Content (see _markup/render-image.html), Hugo does not apply its render hooks to .RawContent. So for every page resource of the variant, the filename in the parenthesized part of a markdown image reference is replaced here by the absolute permalink URL, so the image also resolves outside the original page (zip/markdown/Word) - covers the "![Alt](datei)" case used in practice, not every conceivable markdown syntax variant (e.g. reference links). */ -}} {{- $inhalt := $variante.RawContent -}} {{- range $variante.Resources -}} {{- $inhalt = replace $inhalt (printf "](%s)" .Name) (printf "](%s)" .Permalink) -}} {{- end -}} {{/* Sections written by users (preparation/procedure/background) are H1 in the editor, but here should sit under the document heading and "## Diese Variante", not next to it - see partials/methoden-set-shift-headings.html. */ -}} {{- $inhalt = partial "methoden-set-shift-headings.html" $inhalt -}} --- titel: {{ $titel | jsonify }} quelle: {{ $variante.Permalink | jsonify }} --- # {{ $titel }} {{ with $methode }} {{ with .Params.verwendungsmoeglichkeit }}{{ . }} {{ end }} ## Steckbrief {{ with .Params.zielgruppe }}- Zielgruppe: {{ delimit . ", " }} {{ end -}} {{ with .Params.kompetenzbereich }}- Kompetenzbereich: {{ delimit . ", " }} {{ end -}} {{ with .Params.kategorie }}- Kategorie: {{ delimit . ", " }} {{ end -}} {{ if isset $variante.Params "dauer_minuten" }}- Dauer: {{ $variante.Params.dauer_minuten }} Minuten {{ end -}} {{ if or (isset $variante.Params "gruppengroesse_min") (isset $variante.Params "gruppengroesse_max") -}} - Gruppengröße: {{ if eq $variante.Params.gruppengroesse_min $variante.Params.gruppengroesse_max }}{{ $variante.Params.gruppengroesse_min }}{{ else }}{{ $variante.Params.gruppengroesse_min }}–{{ $variante.Params.gruppengroesse_max }}{{ end }} {{ end -}} {{ with $variante.Params.lizenz }}- Lizenz: {{ . }} {{ end }} {{ with .Params.lernchancen }}**Lernchancen:** {{ delimit . ", " }} {{ end -}} {{ end }} ## Diese Variante {{ with $variante.Params.varianten_beschreibung }}{{ . }} {{ end -}} {{ $inhalt }} {{ with $variante.Params.anhaenge }} ## Anhänge {{ range . }} {{ $anhang := . }} {{ with $variante.Resources.GetMatch $anhang.datei }}- [{{ $anhang.beschreibung | default $anhang.datei }}]({{ .Permalink }}) {{ end -}} {{ end }} {{ end }} --- *Quelle: [{{ $titel }}]({{ $variante.Permalink }}){{ with $variante.Params.autoren }} · Autor:innen: {{ delimit . ", " }}{{ end }}{{ with $variante.Params.lizenz }} · Lizenz: {{ . }}{{ end }}*