Skip to content

Commit

Permalink
Render with jekyll
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed May 1, 2024
1 parent 4e14e26 commit cd9ae8f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/fetch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
run: pip install -r requirements.txt
- name: Run script
run: |
mkdir output
python script.py
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
19 changes: 19 additions & 0 deletions output/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Community notes
---

<table>
{% for row in site.data.notes %}
{% if forloop.first %}
<tr>
{% for pair in row %}
<th>{{ pair[0] }}</th>
{% endfor %}
</tr>
{% endif %}

{% tablerow pair in row %}
{{ pair[1] }}
{% endtablerow %}
{% endfor %}
</table>
2 changes: 1 addition & 1 deletion script.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_generator():
return get_data(yesterday)


with open("output/data.csv", "w") as fh:
with open("output/_data/notes.csv", "w") as fh:
writer = None
for row in get_generator():
if "fullfact" in row["summary"].lower():
Expand Down

0 comments on commit cd9ae8f

Please sign in to comment.