Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to present data with Jekyll #8

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
How to present data with Jekyll
This is an example on how to use a layout to present data contained in _data
  • Loading branch information
peterdesmet committed May 7, 2024
commit b5cc69ab5a44134bff38b5c8c3e23fed91621d28
3 changes: 3 additions & 0 deletions _data/people.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name
1,Bert
2,Ernie
20 changes: 20 additions & 0 deletions _layouts/people.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
layout: default
---

{{ content }}

<table>
<head>
<tr>
<th>ID</th>
<th>Name</th>
</tr>
</head>
{% for person in site.data.people %}
<tr>
<td>{{ person.id }}</td>
<td>{{ person.name }}</td>
</tr>
{% endfor %}
</table>
1 change: 1 addition & 0 deletions pages/report.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
layout: people
title: report
description: Rapporteer een waarneming
permalink: /report/
Expand Down