Add automatic directory listing

Right now directory listing must be manually implemented in Lua scripts. It's trivial to write the script for, but still requires adding an index.gmi file in each directory. It would be massively convenient the server automatically rendered a directory listing in cases where no index.gmi file is found. The implementation for this should be fairly simple.


  • Should there be a configuration option of some kind for disabling this feature? Configuration may need to be fleshed-out for this.
Assigned to
1 year, 1 month ago
1 year, 16 days ago

~olive 1 year, 16 days ago

As a method of configuration, agate allows people to put a .directory-listing-ok file in directories people want listed. https://github.com/mbrubeck/agate#directory-listing

Agate's decision to have it off by default, and to hide files beginning with a .dot, I think should be coped across for safety's sake.

~panda-roux 1 year, 16 days ago

I agree that hiding .dotfiles in directories is a good idea, both in terms of safety and as a means of configuration.

Disabling directory listing by default makes sense. I think a file name like "directory-listing-ok" is a bit wordy though. I'm likely to forget it. I would like that either to be configurable, or something shorter, like ".list".

Register here or Log in to comment, or comment via email.