ref: 65782207dd36421db1c63cbf1b79e11f55fdf12f
parent: b1b47a370dd4991275ef0104ba0dcabed0498152
author: uriel <uriel@suckless.org>
date: Sun Sep 14 19:31:09 EDT 2008
Proper handling of .txt files in sitemaps, sidebar and dir listings.
--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -50,7 +50,7 @@
}
# 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 {
--- a/pub/sitemap.tpl
+++ b/pub/sitemap.tpl
@@ -21,7 +21,7 @@
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 }