A clean, modern theme for NGINX's fancyindex module, branded for Rocky Linux. Features automatic dark mode support based on system preferences.
- NGINX with FancyIndex module installed
-
Download the latest release from the Releases page
-
Extract the contents to your NGINX theme directory:
# For most Linux distributions sudo mkdir -p /usr/share/nginx/html/theme/rocky sudo unzip rocky-nginx-theme.zip -d /usr/share/nginx/html/theme/rocky
-
Configure your NGINX fancyindex location block:
location / { fancyindex on; fancyindex_header "/theme/rocky/header.html"; fancyindex_footer "/theme/rocky/footer.html"; fancyindex_css_href "/theme/rocky/theme.css"; # Optional: Set time format fancyindex_time_format "%Y-%b-%d %H:%M"; }
-
Reload NGINX:
sudo nginx -t && sudo systemctl reload nginx
- Node.js 20.x or later
- npm
-
Clone the repository:
git clone https://github.com/your-username/nginx-fancyindex-rocky.git cd nginx-fancyindex-rocky
-
Install dependencies:
npm install
To build the CSS file from the Less source:
# One-time build
npm run build
# Watch for changes during development
npm run watch
Alternatively, you can use the provided build script:
./build.sh
After building, copy the required files to your NGINX theme directory:
sudo mkdir -p /usr/share/nginx/html/theme/rocky
sudo cp -r {theme.css,header.html,footer.html,js,images,favicon.ico} /usr/share/nginx/html/theme/rocky/
- The theme automatically adapts to light/dark mode based on system preferences
- Pre-built releases include all necessary files with correct permissions
- Installation paths may vary by distribution:
- RHEL/Rocky Linux:
/usr/share/nginx/html/theme/rocky
- Debian/Ubuntu:
/var/www/html/theme/rocky
- Custom installations: Adjust paths accordingly
- RHEL/Rocky Linux:
This theme is licensed under the GPL-3.0 License. See the LICENSE file for details.