109 lines
2.5 kB
1.Dd November 23, 2026
2.Dt WIT 1
3.Os
4.Sh NAME
5.Nm wit
6.Nd static git web frontend
7.Sh SYNOPSIS
8.Nm
9.Op Fl O Ar owner
10.Op Fl u Ar repo
11.Fl o Ar outdir
12.Ar repo ...
13.Sh DESCRIPTION
14.Nm
15writes static HTML pages for git repositories into
16.Ar outdir .
17.Pp
18Each
19.Ar repo
20is a bare repository or a working copy.
21Its name is its directory's name without
22.Pa .git .
23Two repositories with the same name stop the run before anything is written.
24A repository whose HEAD has no commits or is detached is skipped with a warning,
25and so is one with a directory or a release that would overwrite a page.
26.Pp
27.Nm
28writes no stylesheet.
29Copy
30.Pa style.css ,
31.Pa favicon.ico
32and the
33.Pa fonts
34directory from
35.Pa /usr/local/share/doc/wit
36into
37.Ar outdir ,
38and copy them again after changing them.
39.Pp
40The options are as follows:
41.Bl -tag -width Ds
42.It Fl O Ar owner
43Show
44.Ar owner
45as the owner of every repository whose
46.Pa owner
47file is missing or empty.
48.It Fl o Ar outdir
49Write the site into
50.Ar outdir .
51.It Fl u Ar repo
52Rebuild only
53.Ar repo ,
54which must be one of the listed repositories,
55and any listed repository that has no pages in
56.Ar outdir
57yet.
58The index is always written from every listed repository.
59Without
60.Fl u ,
61every repository is rebuilt.
62A rebuilt repository's old pages are deleted first.
63.El
64.Sh FILES
65These files are read from a bare repository's directory,
66or from a working copy's
67.Pa .git
68directory:
69.Bl -tag -width Ds
70.It Pa description
71The description shown on the index and the summary page.
72git's placeholder text counts as none.
73.It Pa owner
74The owner shown on the summary page.
75.It Pa releases/ Ns Ar tag Ns Pa /
76The files of the release for
77.Ar tag .
78They are hard linked into
79.Ar outdir Ns Pa / Ns Ar repo Ns Pa /releases/ Ns Ar tag Ns Pa / ,
80or copied when that fails,
81and listed with their sizes and SHA-256 sums,
82next to zip and tar.gz source archives made by
83.Xr git-archive 1 .
84Subdirectories and symbolic links are ignored.
85A directory that names no tag is skipped with a warning.
86.El
87.Sh EXIT STATUS
88.Ex -std
89.Sh EXAMPLES
90Write a site for every repository in
91.Pa /srv/git :
92.Bd -literal -offset indent
93wit -O alice -o /var/www/git /srv/git/*.git
94cd /usr/local/share/doc/wit
95cp -r style.css favicon.ico fonts /var/www/git/
96.Ed
97.Pp
98Rebuild a repository's pages on every push, with a
99.Pa hooks/post-receive
100script in each repository:
101.Bd -literal -offset indent
102#!/bin/sh
103wit -o /var/www/git -u . /srv/git/*.git
104.Ed
105.Sh SEE ALSO
106.Xr git 1 ,
107.Xr githooks 5
108.Sh AUTHORS
109.An Miguel Leitão Aq Mt git@paramogi.world