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.pythat takes inindext.htmlawards.jsonprojects.jsonthen repeats and substitutes theAWARD,PROJECT,LINKSblocks and removes the content of theTEMPLATE NOTICEblock to generateindex.html(its a custom handrolled script no frameworks) - then i made a fastapi script
serve.pyto preview any template changes live, it hosts a webserver on port 8000 and generatesindex.htmlon the fly usingrun.pywhenever i request it so i don’t have to type the command 1000 times. - i added some logic to
run.pythat 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.pyon GitHub servers - FINALLY now its deployed yippee!!!!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.