Closed sahilshahpatel closed 2 years ago
Local script could use node to watch file system and re-build: https://www.geeksforgeeks.org/node-js-fs-watch-method/
Fixed in #3 by using posthtml. During that I also discovered Hugo, a Go-Lang templating scheme, but for now I'll stick to the longer-running tool
It would be nice to separate content from layout in the source code, especially with repeated components like the projects section. If I ever wanted to do another redesign of the site, separating these things would help a lot!
My current idea is to use mustache.js along with a GitHub Actions script to deploy to a
gh-pages
branch (instead of usingmaster
for deployment like currently).I would also probably want to make a local version of the build script for testing.
With mustache.js the content would all go in a JSON file and the HTML templates would go in a .template file. I could pool all assets (js, css, images) into an
assets
folder and just copy its contents into thegh-pages
branch during the build process.This would definitely make local debugging a lot more annoying, but it would make the code organization a lot nicer. If there is a way to replicate React's ability to auto re-build whenever a source file is changed, that would be awesome!