Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.64 KB

README.md

File metadata and controls

49 lines (36 loc) · 1.64 KB

Djmoch's Git Viewer

Go Reference

DGit is a fast, template-driven Git repository viewer written in pure Go. Being written in pure Go, it is possible to statically-link the resulting command-line interface with all of its dependencies, including templates and static files. When this is achieved, its only external requirements are the Git repositories themselves. This makes DGit suitable for dropping into a chroot or other restricted environment.

HTTP Handler

This Go http.Handler module is imported as djmo.ch/dgit.

To use, initialize DGit with a config.Config object specifying, among other things, an io/fs.FS containing your HTML templates, drop this Handler into your site's http.ServeMux and start viewing Git repositories.

The DGit handler supports both Git HTTP transfer protocols, so read-only repository operations, such as cloning and fetching, are supported.

CLI Reference Implementation

The command line interface (CLI) in this repository is a reference implementation and, as such, is not suitable for general use. It does, however, run the maintainer's Git website. It has been made publicly available to demonstrate how to incorporate DGit into your website.

License

ISC. See the LICENSE file in this repository for full copyright and license information.

Contributing

Contributions are welcome. Full details on how to engage with the maintainer and other developers are in the CONTRIBUTING.md file.