aboutsummaryrefslogtreecommitdiff
path: root/templates/components/showdata.html
diff options
context:
space:
mode:
authorJieiku2026-08-14 15:10:15 -0700
committerJieiku2026-08-14 15:10:15 -0700
commitc2d72e09747a2a4abe9602e1ba49a1b4649c9d3c (patch)
tree51a272ef184752e27bb70c07e4726dbdbbe6e237 /templates/components/showdata.html
parentd52609f456f233ec0845c8a57a1e27583f0813ad (diff)
downloadabridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.tar.gz
abridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.tar.bz2
abridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.zip
Update for Zola 0.23.3
Diffstat (limited to 'templates/components/showdata.html')
-rw-r--r--templates/components/showdata.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/components/showdata.html b/templates/components/showdata.html
new file mode 100644
index 0000000..2aba3b1
--- /dev/null
+++ b/templates/components/showdata.html
@@ -0,0 +1,9 @@
+{%- component showdata(page, config, src, type="", key="") -%}
+{%- if src and key and type -%}
+{%- if src is matching(pat="^http[s]?://") -%}{%- set data = load_data(url=src, format=type) -%}{%- else -%}{%- set data = load_data(path=src, format=type) -%}{%- endif -%}
+{{- data[key] }}
+{%- else -%}
+{%- if src is matching(pat="^http[s]?://") -%}{%- set data = load_data(url=src) -%}{%- else -%}{%- set data = load_data(path=src) -%}{%- endif -%}
+{{- data }}
+{%- endif -%}
+{%- endcomponent showdata -%}