aboutsummaryrefslogtreecommitdiff
path: root/content/overview-showdata.md
blob: 1071eba277c607abd0adf970fe964e0de7774858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
+++
date = 2021-05-09T15:00:00Z
description = "A brief description of a custom Component for Zola that implements loading and displaying external data."
draft = false
title = "Showdata Component"

[extra]
keywords = "Data, Load, External, Components"
series = "Features"
toc = true

[taxonomies]
tags = [
    "Features",
    "Data",
    "Components",
]
+++
The `showdata` component can load and display data from an external source via Zola's [load_data()](https://www.getzola.org/documentation/templates/overview/#load-data) function.

<!-- more -->

These are the parameters, currently all 3 are required.

- `src` path or url to file (if url, must include the http(s):// prefix).
- `type` the type of file to load. [supported types](https://www.getzola.org/documentation/templates/overview/#load-data)
- `key` the field in the data that you want to display.

## Usage

This theme requires version &#123;&#123; showdata(src="../theme.toml" type="toml" key="min_version") &#125;&#125; or later of Zola.

## Output

This theme requires version {{<showdata src="../theme.toml" type="toml" key="min_version" page={page} config={config} />}} or later of Zola.