web frontend for git (tangled's grandpa)
at master 88 lines 2.4 kB view raw
1legit 2----- 3 4A git web frontend written in Go. 5 6Pronounced however you like; I prefer channeling my inner beret-wearing 7Frenchman, and saying "Oui, il est le git!" 8 9But yeah it's pretty legit, no cap on god fr fr. 10 11 12FEATURES 13 14• Fully customizable templates and stylesheets. 15• Cloning over http(s). 16• Less archaic HTML. 17• Not CGI. 18 19 20INSTALLING 21 22Clone it, 'go build' it. 23 24 25CONFIG 26 27Uses yaml for configuration. Looks for a 'config.yaml' in the current 28directory by default; pass the '--config' flag to point it elsewhere. 29 30Example config.yaml: 31 32 repo: 33 scanPath: /var/www/git 34 readme: 35 - readme 36 - README 37 - readme.md 38 - README.md 39 mainBranch: 40 - master 41 - main 42 ignore: 43 - foo 44 - bar 45 dirs: 46 templates: ./templates 47 static: ./static 48 meta: 49 title: git good 50 description: i think it's a skill issue 51 syntaxHighlight: monokailight 52 server: 53 name: git.icyphox.sh 54 host: 127.0.0.1 55 port: 5555 56 57These options are fairly self-explanatory, but of note are: 58 59• repo.scanPath: where all your git repos live (or die). legit doesn't 60 traverse subdirs yet. 61• dirs: use this to override the default templates and static assets. 62• repo.readme: readme files to look for. 63• repo.mainBranch: main branch names to look for. 64• repo.ignore: repos to ignore, relative to scanPath. 65• repo.unlisted: repos to hide, relative to scanPath. 66• server.name: used for go-import meta tags and clone URLs. 67• meta.syntaxHighlight: this is used to select the syntax theme to render. If left 68 blank or removed, the native theme will be used. If an invalid theme is set in this field, 69 it will default to "monokailight". For more information 70 about themes, please refer to chroma's gallery [1]. 71 72 73NOTES 74 75• Run legit behind a TLS terminating proxy like relayd(8) or nginx. 76• Cloning only works in bare repos -- this is a limitation inherent to git. You 77 can still view non-bare repos just fine in legit. 78• Pushing over https, while supported, is disabled because auth is a 79 pain. Use ssh. 80• Paths are unveil(2)'d on OpenBSD. 81• Docker images are available ghcr.io/icyphox/legit:{master,latest,vX.Y.Z}. [2] 82 83LICENSE 84 85legit is licensed under MIT. 86 87[1]: https://swapoff.org/chroma/playground/ 88[2]: https://github.com/icyphox/legit/pkgs/container/legit