From 692f2726452b615cfe39e1d01aa2390425f95d99 Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 25 Sep 2008 11:04:57 +0200 Subject: [PATCH] Dynamically generate a sitemap.txt when the sitemap page is requested --- lib/sitemap.tpl | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/sitemap.tpl b/lib/sitemap.tpl index 78221eb..04d1893 100644 --- a/lib/sitemap.tpl +++ b/lib/sitemap.tpl @@ -1,7 +1,8 @@

Site map

%{ - +p=`{pwd} +tmpfile=$p/tmp/sitemap_$pid.txt saveddf = $dirfilter fn getMdDesc { @@ -17,9 +18,11 @@ fn listDir { echo '' } -cd $sitedir +cd $sitedir listDir . +cp $tmpfile ./sitemap.txt +rm $tmpfile + %}