[Image: The IceFrog]

IceFrog Usage Overview

High Programmer > Alan De Smet > IceFrog > Documentation > IceFrog Usage Overview

DRAFT

Take existing web pages, move to the "source" directory.

Create _icefrog directory at top. Place a settings file in there, specify destination location. (DOCUMENT SETTINGS FILES!)

You can now run icefrog "icefrog ./" to copy into the destination directory.

To really use IceFrog, create at least one template in your top level _icefrog directory. I suggest "template.default.html" because that will be used by default. Base your template on one of your html files. Leave in anything that is shared by all pages and remove anything specific to that one page. Where you removed something, leave in a variable reference ([% variablename %]).

Take the html file and rename it to add ".ifi" to the end. Delete the parts of the file that are now in the template. Assign the remaining parts to keys (variables) with the names you used in your template.

Before: mypage.html:

<html><head>
<title>My Web Page</title>
</head>
<body>
<img src="logo.jpg">
<h1>Alan's Web Site: My Web Page</h1>
<p>This is my web page.
<p>It is neat.
</body>
</html>

After: _icefrog/template.default.html

<html><head>
<title>[% title %]</title>
</head>
<body>
<img src="[% PATHTO("../logo.jpg") %]">
<h1>Alan's Web Site: [% title %]</h1>
[% body %]
</body>
</html>

After: mypage.html.ifi:

title: My Web Page
body<<EOF
<p>This is my web page.
<p>It is neat.

Contact webmaster