Parent
[>]
1//! Route handlers for repository pages. 2//! 3//! Covers two routes: the repository list (`/`) and the repository detail 4//! page (`/{repo}`). The detail handler opens the repository with `gix`, 5//! collects branch and tag summaries via the service layer, reads the 6//! description from `.git/description`, and renders the README as HTML. 7 8use Template; 9use WebTemplate; 10use State; 11use IntoResponse; 12 13use ; 14 15use crateSiteConfig; 16use crateResult; 17use cratefilters; 18use crate; 19use crate; 20 21/// Reads the repository description from `.git/description`, returning `None` 22/// if the file is missing, empty, or contains the default git placeholder text. 23 29 30/// Returns `true` if `url` is a relative path that should be rewritten to 31/// point at the raw file serving route. 32 39 40/// Template context for the repository detail page. 41 42 43 54 55/// Renders the detail page for a single repository, including its branches, 56/// tags, and description. Returns [`Error::RepoNotFound`] if no repository 57/// exists at the given name, or [`Error::GitCorrupt`] if the ref database 58/// cannot be read. 59pub async 178 179/// Template context for a single repository in the list. 180 186 187/// Template context for the repository list page. 188 189 190 194 195/// Renders the repository list page by scanning the root directory for git 196/// repositories. Entries that cannot be opened as a git repository are 197/// skipped. The list is sorted by latest commit first. 198pub async 226 227 228