Code Monkey home page Code Monkey logo

directory-theme's Introduction

Directory Theme

A simple, customizable theme for your Apache or nginx directory listing. Here is a demo of what the result looks like: gif library.

Features

  • search the directory and display results, as the user inputs the search term
  • custom styling of the default directory indexing
  • .html files are linked to without the file extension (ex. http://localhost/example.html -> http://localhost/example)
  • changes "Last modified" column to display time as time since (ex. 2 minutes ago, 4 days ago, etc)

Apache Features

Apache Setup

Be sure you have mod_autoindex loaded on your server.

$ cd into_vhost_root_directory_you_want_to_be_prettified/
$ git clone [email protected]:jfrazelle/directory-theme.git

# move the directory contents to the parent directory
$ cd directory-theme/
$ mv * .[^.]* ..
# you may get an output of: mv: cannot stat ‘*’: No such file or directory
# that's fine, if you `ls -a` the directory it should be empty
$ cd ../

# remove nginx items & .git just so it doesn't mess with your other stuff
$ rm -rf directory-theme.conf
$ rm -rf .git*

Then, view your virtual host in your favorite browser, cough Chrome cough.

nginx Setup

Be sure you have ngx_http_addition_module loaded on your server.

$ cd into_vhost_root_directory_you_want_to_be_prettified/
$ git clone [email protected]:jfrazelle/directory-theme.git

# move the directory contents to the parent directory
$ cd directory-theme/
$ mv * .[^.]* ..
# you may get an output of: mv: cannot stat ‘*’: No such file or directory
# that's fine, if you `ls -a` the directory it should be empty
$ cd ../

# remove apache items & .git just so it doesn't mess with your other stuff
$ rm -rf .htaccess
$ rm -rf .git*

# rename directory-theme.conf to your site config name ex. lab.jessfraz.com
# at the same time moving it to the sites-available folder
$ sudo mv directory-theme.conf /etc/nginx/sites-available/lab.jessfraz.com

# edit the relevant fields for your setup
# these are server_name and root
$ sudo vim /etc/nginx/sites-available/lab.jessfraz.com

# activate the host by creating a symbolic link between
# the sites-available directory and the sites-enabled directory
$ sudo ln -s /etc/nginx/sites-available/lab.jessfraz.com /etc/nginx/sites-enabled/lab.jessfraz.com

# restart nginx
$ sudo service nginx restart

Then, view your virtual host in your favorite browser, cough Chrome cough.

Credits

Based off apaxy by Adam Whitcroft

Analytics

directory-theme's People

Contributors

jessfraz avatar aauroux avatar wcypierre avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.