repos / pgit

static site generator for git
git clone https://github.com/picosh/pgit.git

 1# pgit
 2
 3A static site generator for git.
 4
 5This golang binary will generate a commit log, files, and references based on a
 6git repository and the provided revisions.
 7
 8It will only generate a commit log and files for the provided revisions.
 9
10## usage
11
12```bash
13make build
14```
15
16```bash
17./pgit --revs main --label pico --out ./public
18```
19
20To learn more about the options run:
21
22```bash
23./pgit --help
24```
25
26## themes
27
28We support all [chroma](https://xyproto.github.io/splash/docs/all.html) themes.
29We do our best to adapt the theme of the entire site to match the chroma syntax
30highlighting theme. This is a "closet approximation" as we are not testing every
31single theme.
32
33```bash
34./pgit --revs main --label pico --out ./public --theme onedark
35```
36
37The default theme is `dracula`. If you want to change the colors for your site,
38we generate a `vars.css` file that you are welcome to overwrite before
39deploying, it will _not_ change the syntax highlighting colors, only the main
40site colors.
41
42## with multiple repos
43
44`--root-relative` sets the prefix for all links (default: `/`). This makes it so
45you can run multiple repos and have them all live inside the same static site.
46
47```bash
48pgit \
49  --out ./public/pico \
50  --home-url "https://git.erock.io" \
51  --revs main \
52  --repo ~/pico \
53  --root-relative "/pico/"
54
55pgit \
56  --out ./public/starfx \
57  --home-url "https://git.erock.io" \
58  --revs main \
59  --repo ~/starfx \
60  --root-relative "/starfx/"
61
62echo '<html><body><a href="/pico">pico</a><a href="/starfx">starfx</a></body></html>' > ./public/index.html
63
64rsync -rv ./public/ pgs.sh:/git
65```
66
67## inspiration
68
69This project was heavily inspired by
70[stagit](https://codemadness.org/stagit.html)