projects:httmplate

Description

httmplate is a small perl script that creates html-sites with a template-system.

Usage

Create a file with the layout of your site, everything that should be on every page:
<html> <head> <link rel="stylesheet" type="text/css" href="default.css" /> <title> </title> </head> <body> <div id="top"> some text here </div> <div id="content"> </div> </body> </html>
And another one with content:
<!-- tmpl: <title> --> main <!-- tmpl: <div id="content"> --> <h3>main</h3> <h4>Contents</h4> more text here
now the command
httmplate.pl layoutfile contentfile outputfile
can create a new file with content:
<html> <head> <link rel="stylesheet" type="text/css" href="default.css" /> <title> main </title> </head> <body> <div id="top"> some text here </div> <div id="content"> <h3>main</h3> <h4>Contents</h4> more text here </div> </body> </html>
as you can see, text following the line <!-- tmpl: <html-tag> --> is inserted after the matching tag.

Download

There isn't much to download, just the script: