2024-06-11 18:49:08 +01:00
2024-06-11 18:49:08 +01:00
2023-04-16 10:34:46 +05:30
2024-06-11 18:49:08 +01:00
2024-06-11 18:49:08 +01:00
2024-06-06 17:24:15 +01:00
2024-06-06 17:24:15 +01:00
2022-12-11 11:22:47 +05:30
2024-05-20 18:10:49 +01:00
2024-06-11 18:49:08 +01:00
2024-06-11 18:49:08 +01:00
2022-12-19 18:09:45 +05:30
2024-06-11 18:49:08 +01:00
2024-05-21 00:21:48 +01:00
2024-05-22 12:30:22 +01:00

legit

A git web frontend written in Go

Pronounced however you like; I prefer channeling my inner beret-wearing Frenchman, and saying "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
  ignore:
    - foo
    - bar
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
  • dirs: use this to override the default templates and static assets
  • repo.readme: readme files to look for
  • repo.mainBranch: main branch names to look for
  • repo.ignore: repos to ignore, relative to scanPath
  • 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
  • Pushing over https, while supported, is disabled because auth is a pain - just use SSH
  • Paths are unveil(2)'d on OpenBSD
  • change text in description of bare git repository to get actual descriptions

license

legit is licensed under MIT

Description
legit
Readme 303 KiB
Languages
Go 61.6%
HTML 25.5%
CSS 12.1%
Dockerfile 0.8%