blob: 7f3d3bcfdb34c430386683ea822c4cd8f58e810c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{# showdata(src="../theme.toml" type="toml" key="min_version") #}
{%- if src and key and type %}
{%- if src is matching("^http[s]?://") %}
{% set data = load_data(url=src, format=type) %}
{%- else %}
{% set data = load_data(path=src, format=type) %}
{%- endif %}
{{ data[key] }}
{%- else %}
{# Load other file types as plain text #}
{%- if src is matching("^http[s]?://") %}
{% set data = load_data(url=src) %}
{%- else %}
{% set data = load_data(path=src) %}
{%- endif %}
{{ data }}
{%- endif %}
|