3 ms·
What is the simplest way to host a website closer to barebones HTML, CSS, and a bit of JS with reusable components like nav bars? My experiences handling those
by pwpw 3y ago
What is the simplest way to host a website closer to barebones HTML, CSS, and a bit of JS with reusable components like nav bars? My experiences handling those manually leads to too much overhead as I add more pages. SvelteKit makes things fairly easy to organize, but I dislike how the user isn’t served simple HTML, CSS, and JS files. Ideally, I don’t want to use any framework.
- optymizer 3y agoIt's called PHP and you can host it anywhere, or if there's nothing dynamic going on, run it on the files on your computer and upload the generated HTML/CSS/JS files to an S3 bucket. src/index.php --------- <!DOCTYPE html> <html> <head><title>Hey look ma, we're back to PHP</title></head> <body> <? include "navbar.php" ?> <p>Don't forget about PHP - a hypertext preprocessor!</p> <? include footer.php ?> </body> </html> src/navbar.php ---------- <div> <ul> <li>Home</li> <li>About</li> </ul> </div> Makefile to generate a static site: ----------------------------------- dist/index.html: src/index.php dist/about.html: src/about.php dist/%.html: src/%.php @mkdir -p ${dir $@} php $< > $@
- pier25 3y agoAstro