view README.txt @ 91:672d2d3ee322

document a bit and add a test for an include example
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 10 Jan 2011 21:42:32 -0800
parents 324a70edb73c
children bfab7367eb56
line wrap: on
line source

Make It So!
===========

templates for the people

So people generally do things the easiest way possible.  If you try to
get people to send you a file with, say, a "one-off" script, they will
probably hard code a bunch of stuff in it.  Then, you're not really
sure what needs to be changed and because you're human you might make
a mistake.  Worse, its a perl script and you're a python programmer.
You don't know what that script does!

And this is the time of the iceberg.  If it really is a one-off, who
cares?  But quickly one-offs become a deployment story, and not a very
efficient one.  

Variable Conventions
--------------------

MakeItSo! provides a few variables for you.  You can include another
file or URL using {{include(URI)}}, where URI is the file path or the
URL (of course, internet is required to include remote resources). The
included resource is not included.

Files and URLS being interpolated also have the variable %(here)s,
which is the parent of their resource.  Therefor, using sensible path
conventions, a neighboring file may be (e.g.) included like

{{include(here + 'foo.txt')}}