From 8e18468f1f10830708fa7d74d833e77e53e9aee1 Mon Sep 17 00:00:00 2001 From: Frieder Griesshammer Date: Sun, 9 Oct 2022 20:12:26 +0200 Subject: [PATCH 1/3] Let value shortcode display data from page metadata (below "values") first and then fallback to global values --- layouts/shortcodes/value.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/value.html b/layouts/shortcodes/value.html index 8d35d0b..ad30c06 100644 --- a/layouts/shortcodes/value.html +++ b/layouts/shortcodes/value.html @@ -6,7 +6,9 @@ {{- if not $key }} {{- errorf "missing parameter 'key': %s" .Position }} {{- end }} -{{- $value := index $.Site.Data.values $section $key }} +{{- $page := index (default dict (index (default dict (index $.Page.Params "values")) $section)) $key }} +{{- $site := index (default dict (index $.Site.Data.values $section)) $key }} +{{- $value := default $site $page }} {{- if not $value }} {{- errorf "missing, empty or null value at 'values/%s.%s': %s" $section $key .Position }} {{- end }} From 6ebe809abb9072d41e86d3d12cc711cead81b53f Mon Sep 17 00:00:00 2001 From: Frieder Griesshammer Date: Sun, 9 Oct 2022 20:35:09 +0200 Subject: [PATCH 2/3] Implement head partial to include a redirect when desired --- layouts/partials/head.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 layouts/partials/head.html diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..d95fed0 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,9 @@ +{{- /* handle redirects */}} +{{- with index (default dict (index $.Page.Params "values")) "redirect" }} +{{- $delay := default 0 (index . "delay") }} +{{- $url := index . "url" }} +{{- if not $url }} +{{- errorf "missing, empty or null value at 'values.redirect.url': %s" .Position }} +{{- end }} + +{{- end }} From 59e373ea23e8ba214c53651002666287cdecb317 Mon Sep 17 00:00:00 2001 From: Frieder Griesshammer Date: Sun, 9 Oct 2022 20:45:03 +0200 Subject: [PATCH 3/3] Add 'bbb' page to perform actual redirect onto big blue button --- content/intern/bbb.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 content/intern/bbb.md diff --git a/content/intern/bbb.md b/content/intern/bbb.md new file mode 100644 index 0000000..6415623 --- /dev/null +++ b/content/intern/bbb.md @@ -0,0 +1,18 @@ +--- +title: Big Blue Button +slug: bbb +description: Weiterleitungsseite auf Big Blue Button +draft: false +showmetadates: false +showmetalinks: false +aliases: + - /bbb +values: + redirect: + delay: 1 + url: https://bbb.binary-kitchen.de/b/dez-elx-5xb-h1o +--- + +Diese Seite ist eine Weiterleitung auf unseren Raum bei Big Blue Button. + +[{{< value "redirect" "url" >}}]({{< value "redirect" "url" >}})