swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit e681ac99ef4d2de6e7815f8f3680e7e5705fd53f
parent 00b33e0d3fed702d32a4b0858e67fb6129a37bef
Author: uriel@suckless.org <unknown>
Date:   Sun, 14 Sep 2008 23:31:09 +0200

Proper handling of .txt files in sitemaps, sidebar and dir listings.
Diffstat:
Mbin/controller.rc | 2+-
Mpub/sitemap.tpl | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/controller.rc b/bin/controller.rc @@ -50,7 +50,7 @@ fn gentitle { } # Don't change var name or trailing ';', some dirs change the filter! -dirfilter = '/\/[._]/d; s,^\./,,; s,\.md$,,; s,\.html,,; ' +dirfilter = '/\/[._]/d; /sitemap\.txt/d; s,^\./,,; s,\.md$,,; s,\.html,,; s,\.txt,,; ' # To be used from _config files fn hide_paths { diff --git a/pub/sitemap.tpl b/pub/sitemap.tpl @@ -21,7 +21,7 @@ fn listDir { echo '' if not { - for ( i in `{ ls -d $d/*/ $d/*.md $d/*.html >[2]/dev/null |sed $dirfilter^'/index$/d;' } ) { + 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 }