generator for git.lucas.co
git clone https://git.lucas.co/gitsite.git
readme.txt (1.4K)
1 git.lucas.co
2 ============
3
4 Static git repo browser for Cloudflare Pages. Generates HTML pages
5 (log, commits with diffs, file browser, refs) for the repos listed in
6 repos.conf, plus dumb-http clone support so
7 `git clone https://git.lucas.co/<name>.git` works from static hosting.
8
9 Files
10 -----
11 repos.conf which repos to publish: name|path|description|mode
12 mode "clone" = browse + clonable, "browse" = browse only
13 generate.py the HTML generator
14 build.sh syncs mirrors, runs generate.py, adds clone files
15 deploy.sh pushes the built site to Cloudflare Pages
16 style.css matches lucas.co (black, white, blue links, Circe)
17
18 Workflow
19 --------
20 ./build.sh # output goes to ~/.cache/gitsite/out (not in Dropbox)
21 ./deploy.sh # needs one-time `npx wrangler login`
22
23 Preview locally:
24 python3 -m http.server -d ~/.cache/gitsite/out 8931
25
26 One-time Cloudflare setup
27 -------------------------
28 1. npx wrangler login
29 2. ./deploy.sh (creates the "git-lucas-co" Pages project on first run)
30 3. Cloudflare dashboard -> Workers & Pages -> git-lucas-co ->
31 Custom domains -> add git.lucas.co
32
33 Notes
34 -----
35 - website repo is mode "browse" because its history is 452MB of media;
36 flip to "clone" in repos.conf if you want it clonable anyway.
37 - Mirrors live in ~/.cache/gitsite/mirrors, repacked into <=20MB packs
38 (Cloudflare rejects files over 25MB). Delete a mirror dir to force a
39 fresh re-mirror.
40 - To add a repo: add a line to repos.conf, run build.sh + deploy.sh.