The fancyindex_directories_first directive allows one to enable or
disable grouping directories first before all files when sorting.
This is accomplished by changing the sort function from ngx_qsort (which
is the plain stdlib qsort under the hood) to ngx_sort which is a stable
insertion sort (per ngx_string.c).
We call ngx_sort with the standard sort_cmp_func (albeit modified to remove
grouping dirs), and then, if fancyindex_directories_first is set, call
ngx_sort again with ngx_http_fancyindex_cmp_entries_dirs_first which sorts
entries according to the directories first criterion.
Because a stable sorting function is used, the relative primary order is
preserved when we call ngx_sort again.
Change int (*sort_cmp_func) (const void*, const void*) to ngx_int_t
(*sort_cmp_func) (const void*, const void*) to satisfy ngx_sort.
Travis-CI better signifies the build status, as it tries building with
combinations of compilers, nginx versions, and dynamic vs. statically
linked modules.
This directive enables someone using a custom header to disable the output of the indexed directory by the module
Useful when you want to create links to previous directories via PHP for example
This patch adds a new configuration directive fancyindex_time_format, which
accepts a strftime()-style format string used to format the timestamps in the
generated listings. The accepted format specifiers are an useful subset of
those supported by strftime(), but the libc function is not used to make the
output of the module stable and locale-independent.
This fixes issue #23.
This adds a new "fancyindex_hide_symlinks" configuration flag, which will
filter out symbolic links from the generated file listings when enabled.
Feature suggested by Peter Wemm (https://github.com/DarkHelmet433)
Fixes issue #27
The fancyindex_footer and fancyindex_header settings need the standard Nginx
ngx_http_addition_module built into Nginx. Add a note to this effect in the
README.
Also, a warning is issued at configuration time if the addition module is not
enabled in the configuration.
Closes issue #26.
Adds a link to the nice theme designed by @TheInsomiac, which is a
great example of advanced theming using "fancyindex_header" and
"fancyindex_footer".
Closes issue #11
More exactly:
* In the requirements section, state that the module will work with
any version of Nginx newer than 0.7.x
* Updated URL to the Nginx wiki, using now wiki.nginx.org
* Specifying a custom CSS works, the README was contradicting the code.
FWIW, removed status markers from features in the file.
* Made the build instructions a bit more generic.
Adds a new "fancyindex_ignore string1 [string2 [... stringN]]" directive
which sets a lists of files which are not to be shown in generated listings.
If Nginx is built with PCRE support, strings are interpreted as regular
expressions, and files which match one of the regular expressions in this
list will not be sent in listings.
This allows for inserting a <link> tag in the generated listings pointing to
an additional CSS stylesheet, which will be applied by the browser after the
built-in rules. This allows for super-easy customization of the output look.
* Change old e-mail address to my new one.
* State that the module is unsupported in Nginx 0.6.x
* Remove text about the fancyindex_readme* directives
* Add some basic git ignores.
ngx_chain_t instead of always calling the output filter three times.
This should avoid possible blocking in Nginx code.
- Added warning about using external URLs in subrequest in readme file.
- Factorized out some variable declarations out to function header. Removed
a shadowed variable.
- Removed some debugging statements.