Reorganization of included and template files, made more consistent and logical. inc/ is now called lib/, and all non-staic files in pub/ have moved to lib/.

In site dirs _config and _default.tpl have moved to _werc/ in preparation for things like comments.
This commit is contained in:
Uriel 2008-09-24 20:21:32 +02:00
parent de1d5b1e54
commit 83a10c526a
6 changed files with 45 additions and 18 deletions

View file

@ -1,35 +0,0 @@
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="%('http://'$site^$REQUEST_URI%)" rel="self" type="application/rss+xml" />
<title>%($siteTitle%)</title>
<link>%($uri%)</link>
<description>%($blogDesc%)</description>
<language>en-us</language>
<generator>Tom Duff's rc, and Kris Maglione's clever hackery</generator>
<webMaster>uriel99+rss@gmail.com (Uriel)</webMaster>
%{
for(f in `{sortedBlogPostList $blogDirs}) {
statpost $f
# Hack to aproximate the last build date
#(use the mdate from last posted item)
# Commented out for now because maybe a wrong value is worse than no value
#if(~ $#last_build_date 0) {
#last_build_date='<lastBuildDate>'^$"mdate'</lastBuildDate>'
#echo $last_build_date
#}
%}
<item>
<title>%($title%)</title>
<author>%($by%)@noreply.cat-v.org (%($by%))</author>
<link>%($uri%)</link>
<guid isPermaLink="true">%($uri%)</guid>
<pubDate>%($date%)</pubDate>
<description><![CDATA[<pre>%($summary%)</pre>]]></description>
</item>
% }
</channel>
</rss>

View file

@ -1,52 +0,0 @@
<h1>Site map</h1>
%{
saveddf = $dirfilter
fn getMdDesc {
sed 's/^(.......................................................................................................[^ ]*).*$/\1/g; 1q' < $1
}
fn listDir {
d=$1
dirfilter = $saveddf
blogDirs = ()
if (test -f $d/_config)
. $d/_config
echo '<ul>'
if (! ~ $#blogDirs 0 || ~ $1 blog Blog )
echo ''
if not {
for ( i in `{ ls -d $d/*/ $d/*.md $d/*.html $d/*.txt >[2]/dev/null |sed $dirfilter^'/index$/d;' } ) {
desc = ''
if (test -f $i.md) {
desc = `{ getMdDesc $i.md }
}
if (test -f $i/index.md) {
desc = `{ getMdDesc $i/index.md }
}
if (test -f $i.html) {
# H1 is not reliable because htmlroff doesn't use it :(
#desc = `{ cat $i.html |sed 32q | grep '<[Hh]1>' |sed 's/<[Hh]1>(.*)(<\/[Hh]1>|$)/\1/;s/<[^>]*>//g;1q' }
# Pick the first line of body instead
desc = `{ /bin/sed -e '0,/<[Bb][Oo][Dd][Yy]/d;s/<[^>]*>//g;/^$/d' < $i.html >[2]/dev/null | sed 1q }
}
if (! ~ $desc '')
desc = ' - '$"desc
tit = `{basename $i|sed 's/_/ /g'}
echo '<li><a style="text-transform: capitalize" href="'$i'">'^$"tit^'</a>' $desc '</li>'
if (test -d $i)
@{ listDir $i }
}
}
echo '</ul>'
}
cd $sitedir
listDir .
%}