Hello! I am teaching my friend how to make websites. I would like to keep the websites static, so that he does not [yet] have to learn PHP, worry about testing on his Windows machine, worry about the server configuration, security etc. The bad thing is that without some tool support he would have to repeat a lot of code, for example the menu block on each page is almost the same. Is there a simple tool that would help him?
I’d like something that runs on Windows without too much work, ie. without Perl, Cygwin, IIS, PHP and such. (A simple GUI tool or a text editor with some special support for this would be nice.) I’d like something that does not require keeping separate “source” and “build” file versions, ie. the source files with some special markup and the build ones with regular HTML. (I hate to re-make the whole thing after each change in code.) I’d like something free and simple.
Is there such a thing?
Update: I was dreaming about something that would work like this:
$ cat page.html
<h1>A page</h1>
<!-- insert menu -->
<!-- menu ends -->
$ cat menu.tmpl
<ul id="#menu">…</ul>
$ update-templates page.html && cat page.html
<h1>A page</h1>
<!-- insert menu -->
<ul id="#menu">…</ul>
<!-- menu ends -->
$ echo "Moo" > menu.tmpl
$ update-templates page.html && cat page.html
<h1>A page</h1>
<!-- insert menu -->
Moo
<!-- menu ends -->
…only in GUI. BTW: Thanks for the JavaScript solutions. These did not occur to me, but the website has to work even with JS turned off.
Update: As I did not find any existing solution, I’ve written the script as a Google Code project. There are some quirks to be handled (like the different line endings on different systems), but the template substitution stuff works. The script requires Perl, but otherwise all you have to do is to double-click on an icon to get the HTML sources updated.