From eade40776a11de2b3ad9288ad2b98f174babd54f Mon Sep 17 00:00:00 2001 From: Uriel Date: Sun, 14 Sep 2008 23:31:09 +0200 Subject: [PATCH] Proper handling of .txt files in sitemaps, sidebar and dir listings. --- bin/controller.rc | 2 +- pub/sitemap.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/controller.rc b/bin/controller.rc index 70f82ba..7972430 100755 --- 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 index 818eefd..78221eb 100644 --- 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 }