From: W. Trevor King Date: Tue, 5 Oct 2010 18:24:03 +0000 (-0400) Subject: Added SSI post. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7498790ef0cdc04332b949f3d78fc5ccd657d336;p=blog.git Added SSI post. --- diff --git a/posts/SSI.mdwn b/posts/SSI.mdwn new file mode 100644 index 0000000..ccb30de --- /dev/null +++ b/posts/SSI.mdwn @@ -0,0 +1,31 @@ +[[!meta title="Server side includes"]] + +When I can't use a templating system (e.g. [IkiWiki][] or [CherryPy][] ++ [Jinja2][]), I tend to use [server side includes][SSI] to handle all +the boilerplate header and footer information that is constant across +a website. + +Content-carrying `.shtml` files look something like + + + +

Some title

+

Bla bla bla.

+ + + +The boilerplate files (e.g. [[header.shtml]] and [[footer.shtml]]) are +included by the server whenever it serves a page. This is probably +wildly inefficient from the server's point of view, but it's very +convenient for me :p. It is more efficient if your publishing tool +(e.g. [IkiWiki][]) can include this boilerplate once at +*publish-time*, rather than having Apache include it again for every +page request. + +[IkiWiki]: http://ikiwiki.info/ +[CherryPy]: http://www.cherrypy.org/ +[Jinja2]: http://jinja.pocoo.org/2/ +[SSI]: http://httpd.apache.org/docs/2.2/howto/ssi.html + +[[!tag tags/tools]] +[[!tag tags/web]] diff --git a/posts/SSI/footer.shtml b/posts/SSI/footer.shtml new file mode 100644 index 0000000..7cac68a --- /dev/null +++ b/posts/SSI/footer.shtml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/posts/SSI/header.shtml b/posts/SSI/header.shtml new file mode 100644 index 0000000..5c915d1 --- /dev/null +++ b/posts/SSI/header.shtml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + +Trevor + + + + + +