1 [[!meta title="Server side includes"]]
3 When I can't use a templating system (e.g. [IkiWiki][] or [CherryPy][]
4 + [Jinja2][]), I tend to use [server side includes][SSI] to handle all
5 the boilerplate header and footer information that is constant across
8 Content-carrying `.shtml` files look something like
10 <!--#include virtual="/~wking/shared/header.shtml"-->
15 <!--#include virtual="/~wking/shared/footer.shtml"-->
17 The boilerplate files (e.g. [[header.shtml]] and [[footer.shtml]]) are
18 included by the server whenever it serves a page. This is probably
19 wildly inefficient from the server's point of view, but it's very
20 convenient for me :p. It is more efficient if your publishing tool
21 (e.g. [IkiWiki][]) can include this boilerplate once at
22 *publish-time*, rather than having Apache include it again for every
25 [IkiWiki]: http://ikiwiki.info/
26 [CherryPy]: http://www.cherrypy.org/
27 [Jinja2]: http://jinja.pocoo.org/2/
28 [SSI]: http://httpd.apache.org/docs/2.2/howto/ssi.html