Expand description
Generates a static git web UI and clonable bare repository. Generates a static git repository web UI and a clonable bare clone.
Produces:
<output>/repository/β one HTML log page per branch, refs page, per-commit detail pages<output>/repository.git/β bare clone suitable for dumb HTTP serving
The branch named by git_ui.default_branch is rendered to index.html;
every other branch gets <sanitized-name>.html.
It also generates <output>/repository/browse/<hash>/ β a full recursive
static file tree browser with server-side syntax highlighting (via syntect),
generated for every branch tip and every tagged commit.
This is a site-level step called once from main.rs, not a per-version Builder.
StructsΒ§
- Branch
Entry π - Branch
Nav π - One entry in the branch-switcher nav rendered on every log page.
- Changed
File π - Commit
Info π - A single commitβs metadata, passed to Tera templates.
Cloneis required so commits can be deduplicated across branches. - Commit
Parent π - Crumb π
- One level in the breadcrumb navigation on tree and blob pages.
- Diff
Line π - RefBadge π
- A ref badge shown next to a commit hash on log pages.
- RefInfo π
- Tree
Entry π - One row in a directory listing.
EnumsΒ§
- Diff
Line πKind - The visual kind of a single unified-diff line. Serialises as lowercase for use as a CSS modifier class.
- RefBadge
Kind π - Discriminates the two kinds of ref badge shown on log pages.
Serialises as lowercase (
"tag"/"branch") for use as a CSS modifier class. - Tree
Entry πKind - Kind of an entry in a directory listing. Serialises as lowercase.
ConstantsΒ§
FunctionsΒ§
- build_
browse_ πpages - Build the full static tree browser for every revision in
revisions. - build_
git_ repository_ ui - build_
ref_ πlabels - Build a map from commit hash (hex string) to the ref badges pointing at it. Tags come before branches within each entry; both are sorted alphabetically.
- collect_
branch_ πentries - Collect all local branches and assign output filenames.
- collect_
commits π - Walk at most
maxcommits reachable fromtip, newest first. - collect_
refs π - Collect tags and branches for the refs overview page.
- escape_
html π - export_
bare_ πclone - generate_
clone_ command - get_
changed_ πfiles - make_
crumbs π - Build breadcrumb entries for a tree or blob page.
- make_
spinner π - Generate the repository web UI and bare clone into
config.site.output_dir. Shared spinner style β matches the builder spinners insite.rs. - parse_
diff_ πoutput - Parse the output of
git diff-tree -pinto per-fileChangedFileentries. - parse_
message π - Split a raw commit message into (subject, optional body).
- render_
blob_ πpage - Write one syntax-highlighted blob page to
page_dir/<name>.html. - walk_
tree_ πdir - Recursively generate one
index.html(directory listing) per tree and one<name>.htmlper blob, rooted atrev_dir. TODO: Fix clippy warning about too many arguments