I'm searching for an easy command-line tool that allows me to include other HTML files into a main HTML document. The goal is to generate a single HTML file that I can host on a server. I've found a lot of solutions that involve setting up Node or similar environments, but I really prefer something more straightforward. I'm tempted to script a solution myself, but if there's a ready-made tool out there, I'd love to know about it!
4 Answers
Hey, have you thought about using PHP hosting with server-side includes? It's a classic method that can simplify the process for you!
If you're open to using Node, EJS could be a good choice for templating. Otherwise, for a plug-and-play option, you might be looking at rolling your own solution, as I can't think of an easy alternative.
Many current tools are built in JavaScript and need a Node/Bun/Deno setup. However, you might want to check out Hugo. It's a static site generator in Go that comes as a prebuilt binary with a CLI. It's a bit more complex than you need, but it's a solid option! If you're still leaning toward scripting your own tool, that could work too.
I'd recommend trying out 11ty! It uses Node.js but is pretty simple to work with. They have a quick tutorial that shows how to set up a site in just a few minutes. Just make sure you're okay with doing the setup beforehand, not on the server.
Related Questions
Glassmorphism CSS Generator with Live Preview
Remove Duplicate Items From List
EAN Validator
EAN Generator
Cloudflare Cache Detector
HTTP Status Code Check