Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
anth-dinosaur authored Sep 22, 2023
1 parent 8047156 commit 3de7083
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Test Page

Here is a list of people from my YAML file:
## Occupations
{% assign unique_occupations = site.data.testdata | map: "occupation" | uniq %}
{% for occupation in unique_occupations %}
- [{{ occupation }}](#{{ occupation | slugify }})
{% endfor %}

{% for person in site.data.testdata %}
{% for occupation in unique_occupations %}
## {{ occupation }}
{% for person in site.data.mydata %}
{% if person.occupation == occupation %}
- **Name:** {{ person.name }}
- **Age:** {{ person.age }}
- **Occupation:** {{ person.occupation }}
{% endif %}
{% endfor %}
{% endfor %}

0 comments on commit 3de7083

Please sign in to comment.