Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/airkro/nginx-simple-index
XSLT template for Nginx AutoIndex Pages
https://github.com/airkro/nginx-simple-index
autoindex nginx xslt xslt-stylesheet
Last synced: about 1 month ago
JSON representation
XSLT template for Nginx AutoIndex Pages
- Host: GitHub
- URL: https://github.com/airkro/nginx-simple-index
- Owner: Airkro
- Created: 2022-03-12T01:36:08.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T05:16:19.000Z (12 months ago)
- Last Synced: 2024-01-18T00:21:27.349Z (12 months ago)
- Topics: autoindex, nginx, xslt, xslt-stylesheet
- Language: XSLT
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nginx-simple-index
![sample](./sample.png)
XSLT template for Nginx AutoIndex Pages
## Usage
```conf
# nginx.confload_module modules/ngx_http_xslt_filter_module.so;
server {
location / {
root /mnt;autoindex on;
autoindex_format xml;xslt_stylesheet /path/to/template.xslt;
xslt_string_param path $uri;
}# or
location /abc/ {
autoindex on;
autoindex_format xml;xslt_stylesheet /path/to/template.xslt;
xslt_string_param path $uri;
xslt_string_param root /abc/; # same as location
}
}
```## Features
- Dark mode
- BreadCumbs
- i18n support## i18n support
Parameter lang:
- default: 'en-us'
- enum: ['zh-cn', 'en-us']You can add more languages on 'template.xslt'.
```conf
# nginx.confserver {
location / {
...
xslt_string_param lang 'zh-cn';
}
}
```## Todos
- Mobile friendly
- Remove all Javascript
- Symbol link support## Credits
This work is based upon:
- [dirlist.xslt](https://gist.github.com/wilhelmy/5a59b8eea26974a468c9) by [Moritz Wilhelmy](https://github.com/wilhelmy)
- [abdus/nginx-pretty-index](https://github.com/abdus/nginx-pretty-index)