1
0
Fork
You've already forked srcdump
0
git ssg based on pgit https://srcdump.net
  • Go 69.4%
  • Go Template 21.4%
  • CSS 8.2%
  • Makefile 0.7%
  • Dockerfile 0.3%
2026年06月25日 22:53:55 +00:00
html misc fixes 2026年06月25日 22:53:55 +00:00
static misc changes 2026年06月25日 22:36:16 +00:00
.gitignore chore: build step 2023年06月18日 11:32:34 -04:00
.golangci.yml chore: update linter 2026年01月02日 19:42:48 -05:00
CHANGELOG.md docs: changelog 2026年05月16日 20:35:09 -04:00
Dockerfile chore: update go version and docker img 2025年03月24日 10:38:52 -04:00
go.mod user pages and misc improvements 2026年06月22日 00:28:32 +00:00
go.sum user pages and misc improvements 2026年06月22日 00:28:32 +00:00
LICENSE chore: license 2024年01月15日 20:50:00 -05:00
main.go misc fixes 2026年06月25日 22:53:55 +00:00
Makefile style: cleanup 2026年05月16日 09:29:17 -04:00
mise.toml chore: mise toml 2026年05月11日 22:56:53 -04:00
README.md docs: readme 2026年05月15日 23:48:19 -04:00

pgit

A static site generator for git.

This golang binary will generate a commit log, files, and references based on a git repository and the provided revisions.

It will only generate a commit log and files for the provided revisions.

usage

make build
./pgit --revs main --label pico --out ./public

To learn more about the options run:

./pgit --help

custom nav buttons

We support adding additional buttons to the nav bar:

  • --issues-url redirects users to bug tracking site
  • --contrib-url redirects users to code collab site (e.g. gh pulls, patches, etc.)

themes

We support all chroma themes. We do our best to adapt the theme of the entire site to match the chroma syntax highlighting theme. This is a "closet approximation" as we are not testing every single theme.

./pgit --revs main --label pico --out ./public --theme onedark

The default theme is dracula. If you want to change the colors for your site, we generate a vars.css file that you are welcome to overwrite before deploying, it will not change the syntax highlighting colors, only the main site colors.

with multiple repos

--root-relative sets the prefix for all links (default: /). This makes it so you can run multiple repos and have them all live inside the same static site.

pgit \
 --out ./public/pico \
 --home-url "https://git.erock.io" \
 --revs main \
 --repo ~/pico \
 --root-relative "/pico/"
pgit \
 --out ./public/starfx \
 --home-url "https://git.erock.io" \
 --revs main \
 --repo ~/starfx \
 --root-relative "/starfx/"
echo '<html><body><a href="/pico">pico</a><a href="/starfx">starfx</a></body></html>' > ./public/index.html
rsync -rv ./public/ pgs.sh:/git

inspiration

This project was heavily inspired by stagit