Commit d183f40

Eric Bower  ·  2024-12-20 17:55:05 -0500 EST
parent 8cab5ce
docs: readme
3 files changed,  +30, -3
+27, -0
......@@ -43,3 +43,30 @@ site colors.
4343
4444 This project was heavily inspired by
4545 [stagit](https://codemadness.org/stagit.html)
46+
47+## with multiple repos
48+
49+`--root-relative` sets the prefix for all links (default: `/`). This makes it so
50+you can run multiple repos and have them all live inside the same static site.
51+
52+```bash
53+pgit \
54+ --out ./public/pico \
55+ --label pico \
56+ --home-url "https://git.erock.io" \
57+ --revs main \
58+ --repo ~/pico \
59+ --root-relative "/pico/"
60+
61+pgit \
62+ --out ./public/starfx \
63+ --label starfx \
64+ --home-url "https://git.erock.io" \
65+ --revs main \
66+ --repo ~/starfx \
67+ --root-relative "/starfx"
68+
69+echo '<html><body><a href="/pico">pico</a><a href="/starfx">starfx</a></body></html>' > ./public/index.html
70+
71+rsync -rv ./public/ pgs.sh:/git
72+```
+2, -2
......@@ -16,9 +16,9 @@
1616 </head>
1717 <body>
1818 <header>{{template "header" .}}</header>
19- <hr />
19+ <hr class="my" />
2020 <main>{{template "content" .}}</main>
21- <hr />
21+ <hr class="my" />
2222 <footer>{{template "footer" .}}</footer>
2323 </body>
2424 </html>
+1, -1
......@@ -18,7 +18,7 @@
1818
1919 <div>
2020 <div>{{.Repo.Desc}}</div>
21- <pre class="m-0">git clone {{.SiteURLs.CloneURL}}</pre>
21+ {{if .SiteURLs.CloneURL}}<pre class="m-0">git clone {{.SiteURLs.CloneURL}}</pre>{{end}}
2222 </div>
2323 </div>
2424 {{end}}