You don't need to reinvent anything. Just use what used to exist.
(Also, you start doing SSI, and then you want a bit more power, so you switch to PHP, then before you know it, you go all out with PHP and MySQL. Finally, you say, "MySQL sucks, SQLite is much better and easier" (see also the other comment about SQLite).
In the end you realize that nothing matters. We all die alone in the end.
I'm not just looking for static includes, but dynamic, real-time, editable includes built in to a framework that uses a single syntax to describe a full web app. I'm tired of using full programming languages for describing app data — and how it can be edited — when so much of what a web app can do has already been implemented a billion times.
PHP is great for that, but, in my opinion, is 500% more powerful in areas that don't count (low-level language constructs that make it Turing complete, but not ideal for building real-time, editable web apps) and 10% as powerful as it should be in areas that do count (i.e. performing higher level tasks automatically, like structuring data, syncing data between pages, moving data around, rendering data to the page easily, etc.).
Could you point me to any resources on XSL that would make a good starting point? Or any XSL libraries that help you produce dynamic web applications?
Or if you are old-school, PHP templating, you can do a simple: `<div><?php include('about.html'); ?></div>`
This is how I did most of my static files website 10+ years ago. I had an `index.php` file that based on URL will load the content of an article. This is what PHP was created for.
Any good resources you'd recommend on that? I've been looking around and it seems like a lot of projects are still in the early phases.
Also, yes, PHP is awesome. Just not built for the modern web. Still is a really impressive language, however. I just wish there was a PHP equivalent built specifically for building dynamic, real-time web applications.
Using HTML alone ended up being too cumbersome. I needed a single source of truth that I could serialize the data into and JSON ended up being perfect.
I'm still holding out hope for a single XML-like language that can describe web apps in full, however. The tools we use now are way too broad and powerful compared to what you end up implementing with them 99% of the time.
You could just do:
And that would go into your about page, copy the content from there, and insert it into the current page.If you built it out well enough, you could do everything using just static HTML and CSS files and just syncing the content whenever it changes.
I've been thinking about this idea for a while. I even started my own framework to try to make something like this work. I'd love to know what other people think.