An open API service indexing awesome lists of open source software.

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

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)

![Screenshot](screenshot.avif)

## 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;
}
```