''[JM] 29 Dec 2012'' - When reading about [Templates and subst] on this wiki, I came across this web page [http://andy.junkdrome.org] and wanted to give it a try, on my Windows XP pc.
The apache installation on this machine comes from the xampp [http://www.apachefriends.org/en/xampp.html] bundle and it was installed under: C:\xampp
These are the steps I have taken to setup this script and learn during that process (thanks Andy):
1.- Copied the tcl script [http://andy.junkdrome.org/cgi-bin/site.tcl] to my C:\xampp\cgi-bin folder.<
>
2.- Copied the site.css from [http://andy.junkdrome.org] in order to get the nice and simple style that you see there.<
>
3.- Created a .htaccess file on my root folder (C:\xampp\htdocs) with the following contents:
======none
# Enable URL rewriting.
RewriteEngine on
# Just let Apache send/process the file if it already exists. This rule also
# prevents an infinite rewrite loop, since the rewrite maps to an existing file.
RewriteCond %{REQUEST_FILENAME} !-f
# Generate all directory listings, phony files, etc. with a script.
RewriteRule ^ /cgi-bin/site.tcl [L]
# Hide dotfiles.
Order deny,allow
Deny from all
======
4.- Modified the site.tcl script to match my "site" (these are the few lines that I modified)
======none
# Configuration.
set ::docroot xampp/htdocs
set ::baseurl http://localhost
======
Of course, you should also modify the mail and timezone variables for your own page.<
>
5.- Finally, I just made a file called .desc (which are simply lists of three-element lists consisting of a title, a [[[clock seconds]]] time, and templatized HTML) with some dummy posts to see how it works. Here the contents of such file:
======none
{title1 1356737274 "some content"}
{title2 1356737274 {some Andy more content}}
{title3 1356737274 "some more content"}
{title4 1356737274 "and more content"}
{title5 1356737274 "some content"}
{title6 1356737274 "some content"}
{title7 1356737274 "some content"}
{title8 1356737274 "some content"}
{title9 1356737274 "some content"}
{titleA 1356737274 "some content"}
{titleB 1356737274 "some content"}
{titleC 1356737274 "some content"}
======
Final Notes:
* .htaccess and .desc files are gretting listed on my Windows PC, on Unix though, [[[glob] *]] skips dotfiles, at least 8.5.2's [[glob]] does. (As [AMG] explained to me)
* I have not explored yet the templatized html feature included on the script, that is a "to be continued" kind of thing...
* Also, you will have a missing slot on top of the page, for you site's logo/banner
* You cannot create a .desc or .htaccess from the file explorer GUI in windows, you can however, create the files from DOS and/or wish
<> Template | Web | Internet