Skip to content

Commit 7291909

Browse files
committed
Use a python generator
1 parent 482970e commit 7291909

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v4
24+
- run: python3 generate.py
2425
- run: mkdir dist && mv *.html dist
2526
- name: Upload artifact
2627
uses: actions/upload-pages-artifact@v3

generate.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sys
2+
3+
4+
def page(slug, url):
5+
with open(slug + ".html", "w") as sys.stdout:
6+
print(f"<meta http-equiv='refresh' content='0;url={url}' />")
7+
8+
9+
page("index", "https://github.com/libmath/math/issues/1")
10+
page("wiki", "https://github.com/libmath/z/wiki")
11+
page("stack", "https://github.com/libmath/math/issues/1")

index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

stack.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

wiki.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)