changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > werc / changeset: Document dir listing optinos and _header.md and _footer.md

changeset 593: 6568e0c6afdd
parent 592: 0202b270605e
child 594: a150ab6df4e2
author: uriel@soma
date: Wed, 30 Sep 2009 21:44:16 +0000
files: sites/werc.cat-v.org/docs/dir_listings.md
description: Document dir listing optinos and _header.md and _footer.md
     1.1--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2+++ b/sites/werc.cat-v.org/docs/dir_listings.md	Wed Sep 30 21:44:16 2009 +0000
     1.3@@ -0,0 +1,29 @@
     1.4+Autogenerated Directory Listings
     1.5+================================
     1.6+
     1.7+If a directory has no `index.md`, `index.html` or `index.txt` and has no other
     1.8+*main handler* set up by a [werc app](/apps/), the default directory listing
     1.9+handler is used.
    1.10+
    1.11+The default directory handler simply displays the path to the directory, and a
    1.12+list of links to all files and dirs located at this path.
    1.13+
    1.14+
    1.15+Header and footer
    1.16+-----------------
    1.17+
    1.18+If a `_header.md` or `_footer.md` files are found in the directory, their
    1.19+contents will be displayed in the corresponding sections before and after
    1.20+the directory contents.
    1.21+
    1.22+
    1.23+Tuning the item's order
    1.24+------------------------
    1.25+
    1.26+You can set the `dir_listing_ls_opts` config variable in the dir's corresponding _werc/config to change the way items will be ordered.
    1.27+
    1.28+For example to list items in reverse chronological order simply add:
    1.29+
    1.30+    dir_listing_ls_opts=( -t )
    1.31+
    1.32+The options taken are [the standard Plan 9 ls(1) flags](http://man.cat-v.org/plan_9/1/ls).