hgweb: expose list of per-repo labels to templates
hgweb currently offers limited functionality for "classifying" repositories. This patch aims to change that. The web.labels config option list is introduced. Its values are exposed to the "index" and "summary" templates. Custom templates can use template features like ifcontains() to e.g. look for the presence of a specific label and engage specific behavior. For example, a site operator may wish to assign a "defunct" label to a repository so the repository is prominently marked as dead in repository indexes.
Showing
- mercurial/help/config.txt 8 additions, 0 deletionsmercurial/help/config.txt
- mercurial/hgweb/hgwebdir_mod.py 4 additions, 1 deletionmercurial/hgweb/hgwebdir_mod.py
- mercurial/hgweb/webcommands.py 2 additions, 1 deletionmercurial/hgweb/webcommands.py
- mercurial/templates/json/map 4 additions, 2 deletionsmercurial/templates/json/map
- tests/test-hgweb-json.t 1 addition, 0 deletionstests/test-hgweb-json.t
- tests/test-hgwebdir.t 217 additions, 2 deletionstests/test-hgwebdir.t
Loading
Please register or sign in to comment