diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index f2c9e97..347bd7a 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -33,6 +33,14 @@ jobs: uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v5 + + - name: Generate pages + env: + PAGES: ${{ secrets.PAGES }} + run: | + echo $PAGES > pages + python3 generate-html.py + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b4d43e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +secrets.txt \ No newline at end of file diff --git a/882nd.html b/882nd.html deleted file mode 100644 index 136d21e..0000000 --- a/882nd.html +++ /dev/null @@ -1,14 +0,0 @@ - - -
- - - -- If you are not being redirected to 882nd click here -
- - diff --git a/generate-html.py b/generate-html.py new file mode 100644 index 0000000..ec91615 --- /dev/null +++ b/generate-html.py @@ -0,0 +1,9 @@ +file = open("pages", "r") +template = open("template.html", "r").read() + +for project in file.readlines(): + (name, url) = map(str.strip,project.split(" ")) + + open(f"{name}.html", "w").write( + template.replace("%name%", name).replace("%url%", url) + ) diff --git a/template.html b/template.html new file mode 100644 index 0000000..c19af36 --- /dev/null +++ b/template.html @@ -0,0 +1,13 @@ + + + + + + ++ If you are not being redirected to %name% click here +
+ +