Skip to content

Go homepage is a customisable FastCGI directory indexer

Notifications You must be signed in to change notification settings

aaaaaaaalex/ghp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(G)o (h)ome(p)age

GHP is a FastCGI auto-indexer similar to the NGINX Auto-index feature, but allows for fully customisable index pages via Go Templates

Installation

This is a very dumb single-file program. Install it wherever you like :D For use with Nginx, see the sample nginx config

Usage

Just run ghp!

ghp -h for full list of config options

Writing index files

Index files are written and rendered as Go Templates. The currently-served directory's contents are passed as data to the index with the type []os.FileInfo, and can be referenced with .. For more detail, see an example

Additional util functions

  • Request: Get the current request (*http.Request)

  • BaseURL( *http.Request ): returns the current request's URL.Path, formatted for use with the HTML <base> tag

About

Go homepage is a customisable FastCGI directory indexer

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages