mirror of
https://github.com/danog/gojekyll.git
synced 2024-11-26 19:34:52 +01:00
Refine data page example
This commit is contained in:
parent
56a7d8474d
commit
aed6802999
@ -1,2 +1,3 @@
|
||||
key,value
|
||||
1,2
|
||||
k1,a
|
||||
k2,b
|
||||
|
|
@ -1 +1,3 @@
|
||||
key: data file value
|
||||
k1: data file value
|
||||
k2: another value
|
||||
k0: last value
|
||||
|
@ -1 +1 @@
|
||||
{"key": "json data"}
|
||||
[["k1", "json data"],["k2", "more data"]]
|
||||
|
@ -3,11 +3,21 @@
|
||||
|
||||
## YAML data
|
||||
|
||||
* {{ site.data.file_data.key }}
|
||||
{% assign data = site.data.file_data %}
|
||||
<table>
|
||||
{% for k in data %}
|
||||
<tr><td>{{ k[0] }}</td><td>{{ k[1] }}</td>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
## JSON data
|
||||
|
||||
{{ site.data.json_data.key }}
|
||||
{% assign data = site.data.json_data %}
|
||||
<table>
|
||||
{% for k in data %}
|
||||
<tr><td>{{ k[0] }}</td><td>{{ k[1] }}</td>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
## CSV data
|
||||
|
||||
|
@ -10,11 +10,12 @@ variable: page variable
|
||||
* {{ site.static_files.size }} Static Files
|
||||
* {{ site.html_pages.size }} HTML Pages
|
||||
* {{ site.html_files.size }} HTML Files
|
||||
* {{ site.pages.collections }} Collections
|
||||
* {{ site.pages.collections.size }} Collections
|
||||
|
||||
## Tests
|
||||
|
||||
* [Archive]({% link archive.md %})
|
||||
* [Data]({% link data.md %})
|
||||
* [Collections]({% link collections.html %})
|
||||
* [Markdown]({% link markdown.md %})
|
||||
* [Pages]({% link pages.md %})
|
||||
@ -23,6 +24,9 @@ variable: page variable
|
||||
* [Static file]({% link static.html %})
|
||||
* [Tags]({% link tags.md %})
|
||||
* [Variables]({% link variables.md %})
|
||||
|
||||
## Variables
|
||||
|
||||
* {{ page.variable }}
|
||||
* {{ site.variable }}
|
||||
* {{ site.data.file_data.key }}
|
||||
* {{ site.data.file_data.k1 }}
|
||||
|
Loading…
Reference in New Issue
Block a user