aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/wikipedia.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/shortcodes/wikipedia.html')
-rw-r--r--themes/default/layouts/shortcodes/wikipedia.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/wikipedia.html b/themes/default/layouts/shortcodes/wikipedia.html
new file mode 100644
index 0000000..7b9e51f
--- /dev/null
+++ b/themes/default/layouts/shortcodes/wikipedia.html
@@ -0,0 +1,16 @@
+{{- $id := default "Knowledge" (.Get "id" | default (.Get 0)) -}}
+{{- $title := default "Wikipedia Article" (.Get "title" | default (.Get 1)) -}}
+{{-
+ $caption := default
+ (print $title ": [Link](" "https://en.m.wikipedia.org/wiki/" $id ")")
+ (.Get "caption" | default (.Get 2))
+-}}
+
+<wikipedia-container title="{{ $title }}">
+ <iframe loading="lazy"
+ src="https://en.m.wikipedia.org/wiki/{{ $id }}"
+ title="{{ $title }}"
+ height="300"
+ ></iframe>
+ <figcaption>{{ $caption | markdownify }}</figcaption>
+</wikipedia-container>