Templated Static Content
This concept is somewhat unique to Sprouts!
The closest concept is "server side includes" that is supported by some servers, like Apache, but it's not really the same, which should become apparent as we proceed.
Now, the phrase "templated static content" sounds strange — templates are usually associated with dynamic content!
Usually, when you are using a template language, the purpose is to have the content be dynamically generated, depending on the data passed to it (e.g. from a database).
For Sprouts though, templates are just a way to generate static content.
For example, to enforce a common layout among several pages, they can all be set to extend the same base layout template.
We expect the content of a template to not change from one request to another.
This is not just an assumption — it's the basic contract.
The purpose of the template is to generate static content. Once that content is generated, subsequent requests just use the already generated content instead of executing the template again.
Templated static content means you do not need static site generators. You get similar features without the overhead.
Static Site Generators:
- Configuration Files
- Very specific rules
- Build Process
- Separation between "source" and "distributable"
Templated Static Content:
- Free to structure however you want
- No explicit build step
- The source is the distributable
This entire website is built using the template system described here.
This section, the "Sprouts/Gardener Manual" has a base layout that is shared by all the pages in it.
Other sections of the site, for instance, essays, have their own shared layout.