Skip to content

XSLT template for Nginx AutoIndex Pages

Notifications You must be signed in to change notification settings

Airkro/nginx-simple-index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

nginx-simple-index

sample

XSLT template for Nginx AutoIndex Pages

Usage

# nginx.conf

load_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'.

# nginx.conf

server {
  location / {
    ...
    xslt_string_param lang 'zh-cn';
  }
}

Todos

  • Mobile friendly
  • Remove all Javascript
  • Symbol link support

Credits

This work is based upon:

About

XSLT template for Nginx AutoIndex Pages

Topics

Resources

Stars

Watchers

Forks

Languages