diff --git a/content/konto.md b/content/konto.md index 9875274..6d1ed40 100644 --- a/content/konto.md +++ b/content/konto.md @@ -17,19 +17,19 @@ aliases: ### Empfänger -> `dezentrale e.V.` +> `{{< value "account" "recepient" >}}` ### Institut -> `Sparkasse Leipzig` +> `{{< value "account" "institution" >}}` ### IBAN -> `DE48 8605 5592 1090 1699 29` +> `{{< value "account" "iban" >}}` ### BIC -> `WELADE8L` +> `{{< value "account" "bic" >}}` Für Spenden oder Mitgliedsbeiträge stellen wir gerne eine steuerabzugsfähige diff --git a/data/values.yaml b/data/values.yaml new file mode 100644 index 0000000..c120675 --- /dev/null +++ b/data/values.yaml @@ -0,0 +1,5 @@ +account: + recepient: dezentrale e.V. + institution: Sparkasse Leipzig + iban: DE48 8605 5592 1090 1699 29 + bic: WELADE8L diff --git a/layouts/shortcodes/value.html b/layouts/shortcodes/value.html new file mode 100644 index 0000000..d9eabc7 --- /dev/null +++ b/layouts/shortcodes/value.html @@ -0,0 +1,13 @@ +{{- $section := default (.Get 0) (.Get "section") -}} +{{- $key := default (.Get 1) (.Get "key") -}} +{{- $value := index $.Site.Data.values $section $key -}} +{{- if not $section }} +{{- errorf "missing parameter 'section': %s" .Position }} +{{- end }} +{{- if not $key }} +{{- errorf "missing parameter 'key': %s" .Position }} +{{- end }} +{{- if not $value }} +{{- errorf "missing, empty or null value at 'values/%s.%s': %s" $section $key .Position }} +{{- end }} +{{- $value -}}