Skip to content

A πŸ“± responsive theme for Nginx Fancyindex module πŸ”§. Minimal, modern and simple. β˜€ Light & 😎 Dark themes. Comes with a search form πŸ”Ž, aims to handle thousands of files without any problems πŸ“‚

License

Notifications You must be signed in to change notification settings

Naereen/Nginx-Fancyindex-Theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

81 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nginx-Fancyindex-Theme

A responsive theme for Nginx Fancyindex module (by @aperezdc).

Usage

  1. Ensure the fancyindex package is built or installed
  2. Update the nginx configuration with the fancy index flags
  3. Move the Nginx-Fancyindex/ folder to the root of the site directory as defined in the nginx configuration.
  4. Restart/reload nginx.

FancyIndex Installation sources

Nginx Configuration

...
http {
    ...
    server {
        listen 80;
        server_name X.X.X.X;
        root /var/www/html;

        # Serve content from /share
        location ^~ / {
            fancyindex on;
            fancyindex_localtime on;
            fancyindex_exact_size off;
            fancyindex_header "/Nginx-Fancyindex/header.html";
            fancyindex_footer "/Nginx-Fancyindex/footer.html";
            fancyindex_name_length 255;
            ...
        }
    }
}

RHEL Procedure

# on Fedora-based OS (RHEL/CentOS/Rocky)
dnf install nginx-mod-fancyindex
nano /etc/nginx/nginx.conf
mv ./Nginx-Fancyindex /var/www/html/
# restorecon -Rv /var/www/html/
nginx -s reload
# OR: systemctl restart nginx.service

Configuration Options

A standard configuration looks something like this:

fancyindex on;
fancyindex_localtime on;
fancyindex_exact_size off;
fancyindex_header "/Nginx-Fancyindex/header.html";
fancyindex_footer "/Nginx-Fancyindex/footer.html";
# Ignored files will not show up in the directory listing, but will still be public.
fancyindex_ignore "examplefile.html";
# Making sure folder where these files are do not show up in the listing.
fancyindex_ignore "Nginx-Fancyindex";

Javascript Explanation

  • addNginxFancyIndexForm.js enhances the listing with search filtering, persistent theme selection, and dark-mode responsiveness.
  • jquery.min.js bundles jQuery 2.1.0 for DOM querying, event handling, and AJAX utilities used across the page.
  • showdown.min.js provides the Showdown Markdown-to-HTML converter leveraged when loading optional documentation files

Screenshots

Dark-Narrow

Dark-Wide

Light-Narrow

Light-Wide


About

A πŸ“± responsive theme for Nginx Fancyindex module πŸ”§. Minimal, modern and simple. β˜€ Light & 😎 Dark themes. Comes with a search form πŸ”Ž, aims to handle thousands of files without any problems πŸ“‚

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 11