https://github.com/remino/elegant-autoindex
Stylish sortable autoindex template for nginx
https://github.com/remino/elegant-autoindex
autoindex css javascript nginx xslt
Last synced: 6 months ago
JSON representation
Stylish sortable autoindex template for nginx
- Host: GitHub
- URL: https://github.com/remino/elegant-autoindex
- Owner: remino
- License: isc
- Created: 2024-08-24T14:22:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-02T11:57:52.000Z (over 1 year ago)
- Last Synced: 2025-01-22T10:14:30.927Z (over 1 year ago)
- Topics: autoindex, css, javascript, nginx, xslt
- Language: JavaScript
- Homepage: https://remino.github.io/elegant-autoindex/
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
elegant-autoindex
=================
Stylish sortable autoindex template for nginx.
By Rémino Rem
[Site](https://remino.github.io/elegant-autoindex/) | [Code](https://github.com/remino/elegant-autoindex) | [License](LICENSE.txt)

## Description
Includes an XSLT file to transform the default nginx autoindex, a CSS file to style the result, and a JavaScript file to make the table sortable.
## Usage
First, clone the repo and link the files to the appropriate directories:
```sh
git clone https://github.com/remino/elegant-autoindex /opt/elegant-autoindex
ln -s /etc/nginx/snippets/elegant-autoindex-files.conf /opt/elegant-autoindex/etc/nginx/snippets/elegant-autoindex-files.conf
ln -s /etc/nginx/snippets/elegant-autoindex-enable.conf /opt/elegant-autoindex/etc/nginx/snippets/elegant-autoindex-enable.conf
ln -s /var/lib/nginx/elegant-autoindex /opt/elegant-autoindex/var/lib/nginx/elegant-autoindex
```
Then, include the `elegant-autoindex-enable.conf` snippet in your server configuration:
```nginx
server {
# Location with file listings:
location ~ /files/ {
# ...
include snippets/elegant-autoindex-enable.conf;
# ...
}
include snippets/elegant-autoindex-files.conf;
}
```