Made the basic parts of the site
i made the frontend part of the site, here is what i did
- first i made the template
indext.html(see 2nd screenshot) , the template has blocks like this
<!--!BEGIN AWARD-->
<div class="award">
<h3>[[result]]</h3>
<p>[[event]]</p>
<p class="faded">[[details]]</p>
</div>
<!--!END AWARD-->
...
...
<!--!BEGIN PROJECT-->
<div class="project">
<h3>[[title]]</h3>
<p>[[description]]</h3>
<div class="links">
<!--!BEGIN LINKS-->
<a href="[[url]]" target="_blank">[[label]]</a>
<!--!END LINKS-->
</div>
</div>
<!--!END PROJECT-->
- then i made a script
run.py that takes in indext.html awards.json projects.json then repeats and substitutes the AWARD, PROJECT, LINKS blocks and removes the content of the TEMPLATE NOTICE block to generate index.html (its a custom handrolled script no frameworks)
- then i made a fastapi script
serve.py to preview any template changes live, it hosts a webserver on port 8000 and generates index.html on the fly using run.py whenever i request it so i don’t have to type the command 1000 times.
- i added some logic to
run.py that inlines all CSS, JS and fonts to reduce everything to one request, then minifies it into an optimized bundle, so it’s now larping vite/webpack
- i made a GH action that automatically deploys the GitHub Pages site by running
run.py on GitHub servers
- FINALLY now its deployed yippee!!!!