mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / SSI.mdwn
1 [[!meta  title="Server side includes"]]
2
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
6 a website.
7
8 Content-carrying `.shtml` files look something like
9
10     <!--#include virtual="/~wking/shared/header.shtml"-->
11
12     <h1>Some title</h1>
13     <p>Bla bla bla.</p>
14
15     <!--#include virtual="/~wking/shared/footer.shtml"-->
16
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
23 page request.
24
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
29
30 [[!tag tags/tools]]
31 [[!tag tags/web]]