changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > werc / sites/werc.cat-v.org/docs/dir-listings.md

changeset 635: dd58ad29ffbf
parent: sites/werc.cat-v.org/docs/dir_listings.md@6568e0c6afdd
author: Uriel <u@berlinblue.org>
date: Sun, 30 May 2010 18:04:04 +0000
permissions: -rw-r--r--
description: Replace '_' in paths in werc's docs section with '-', and set up apropriate redirects to avoid broken links.
1 Autogenerated Directory Listings
2 ================================
3 
4 If a directory has no `index.md`, `index.html` or `index.txt` and has no other
5 *main handler* set up by a [werc app](/apps/), the default directory listing
6 handler is used.
7 
8 The default directory handler simply displays the path to the directory, and a
9 list of links to all files and dirs located at this path.
10 
11 
12 Header and footer
13 -----------------
14 
15 If a `_header.md` or `_footer.md` files are found in the directory, their
16 contents will be displayed in the corresponding sections before and after
17 the directory contents.
18 
19 
20 Tuning the item's order
21 ------------------------
22 
23 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.
24 
25 For example to list items in reverse chronological order simply add:
26 
27  dir_listing_ls_opts=( -t )
28 
29 The options taken are [the standard Plan 9 ls(1) flags](http://man.cat-v.org/plan_9/1/ls).