I'm working on a website that just uses HTML, CSS, and JS (no backend needed). It's a simple site whose main purpose is to present information. I have one standard template for all the pages (header, area for content, footer). Right now, I have to copy and paste it into each page and update any changes to it manually on a page by page basis.
Are there any good programs out there that will allow me to:
Bonus points for something that works similar to SASS where I can have the program watch a directory for changes and auto-compile files into another directory.
Bonus points for something that allows me to add in content at multiple sections.
I want to reiterate- I do not want to use a backend language (such as PHP or Django) that would stitch the pages together on the fly. The site I'm working on doesn't need that, and it would negatively affect performance and maintainability.
Look at google closure templates https://developers.google.com/closure/templates/docs/helloworld_java
It takes soy files (templates) as input, then you can pass in whatever data you want and it'll merge the template with the data, generating the HTML.
You could also use PHP from the command line to generate the HTML http://php.net/manual/en/features.commandline.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With