1.8 KiB
1.8 KiB
gendex
gendex is a simple script that generates directory listings and writes them into an index.html
file.
Usage
env <some environment variables here> ./gendex.sh
Environment variables
gendex supports environment variables for build and output customization.
All environment variables are prefixed with GENDEX_
.
To avoid unnecessary table bloat, we've decided to leave it out.
For a list of data types, see this sos!bashutils documentation page.
VARIABLE | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
NOFANCY |
bool |
false |
Whether to print things like the "Generation successful" message |
RECURSE |
bool |
false |
Whether to recurse downwards and create a directory index for all directories found |
MINIFY |
bool |
false |
Whether to minify the final output. This will just remove all newlines |
OUTPUT |
str |
./index.html |
Where gendex should output it's generated HTML file to |
LOCALPATH |
str |
|
The local location of the specified directory. Used in the index's title and header. This value is always prefixed with a / |
TEMPLATE |
str |
|
The absolute location of the .html template to use. Uses the standard template if empty |
Templates
Templates are simple HTML files which form the generator's output.
To specify a custom template, pass GENDEX_TEMPLATE