git web interface in go (fork)
Find a file
zak e5d35c4dec css: scroll file content x-axis only
- we don't need any overflow scrolling for the y-axis.
- set overflow-x to 'auto' so that the scroll bar only shows
  when the content does overflow.
2022-12-20 07:37:27 +05:30
config config: fix yaml 2022-12-19 09:57:25 +05:30
git diff: show diff type 2022-12-19 18:07:13 +05:30
routes index: turn off logging, it's too noisy 2022-12-19 17:38:21 +05:30
static css: scroll file content x-axis only 2022-12-20 07:37:27 +05:30
templates diff: scroll diff on overflow 2022-12-19 22:15:03 +05:30
.gitignore all: init 2022-12-11 11:22:47 +05:30
config.yaml all: no more pretty urls 2022-12-19 09:02:23 +05:30
go.mod all: no more pretty urls 2022-12-19 09:02:23 +05:30
go.sum git, templates: diff view 2022-12-17 22:35:48 +05:30
license add license 2022-12-19 18:09:45 +05:30
main.go all: no more pretty urls 2022-12-19 09:02:23 +05:30
readme readme: add note clarifying cloning 2022-12-19 22:33:33 +05:30
unveil.go unveil: clarify its uselessness 2022-12-19 12:08:31 +05:30

legit
-----

A git web frontend written in Go. 

Pronounced however you like; I prefer channeling my beret-wearing
Frenchman, and say "Oui, il est le git!"

But yeah it's pretty legit, no cap on god fr fr.


FEATURES

• Fully customizable templates and stylesheets.
• Cloning over http(s).
• Less archaic HTML.
• Not CGI.


INSTALLING

Clone it, 'go build' it.


CONFIG

Uses yaml for configuration. Looks for a 'config.yaml' in the current
directory by default; pass the '--config' flag to point it elsewhere.

Example config.yaml:

    repo:
      scanPath: /var/www/git
      readme:
        - readme
        - README
        - readme.md
        - README.md
      mainBranch:
        - master
        - main
    dirs:
      templates: ./templates
      static: ./static
    meta:
      title: git good
      description: i think it's a skill issue
    server:
      name: git.icyphox.sh
      host: 127.0.0.1
      port: 5555

These options are fairly self-explanatory, but of note are:

• repo.scanPath: where all your git repos live (or die). legit doesn't
  traverse subdirs yet.
• repo.readme: readme files to look for. Markdown isn't rendered.
• repo.mainBranch: main branch names to look for.
• server.name: used for go-import meta tags and clone URLs.


NOTES

• Run legit behind a TLS terminating proxy like relayd(8) or nginx. 
• Cloning only works in bare repos -- this is a limitation inherent to git. You
  can still view bare repos just fine in legit.
• The default head.html template uses my CDN to fetch fonts -- you may
  or may not want this.
• Support or cgit-like filters (for readmes etc.) is planned.
• Pushing over https, while supported, is disabled because auth is a
  pain. Use ssh.
• "Private" repos only available over Tailscale is planned.


LICENSE

legit is licensed under MIT.