Phase 5 part 1: read a site's section types and pages

Sites → Sections and pages reads the website's Hugo repository: each
section type with the README's description, the fields in use and the
layout's, the pages using it and a real example; the pages and their
sections; the latest commits. Working copies are now held by one job at a
time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 13:52:35 -07:00
co-authored by Claude Opus 5.5
parent 00e6deee00
commit 1152cd448b
15 changed files with 958 additions and 11 deletions
+4 -2
View File
@@ -200,10 +200,11 @@ func (ap *Applier) SetupSite(ctx context.Context, d *db.DB, site, key string, no
}
func (ap *Applier) setupSite(ctx context.Context, site, key string, st *Setup) error {
wc, full, branch, err := ap.workingCopy(ctx)
wc, full, branch, err := ap.WorkingCopy(ctx)
if err != nil {
return err
}
defer wc.Release()
canBuild, note := buildCheck(ctx, wc)
work := "supermarket/search-engines"
if err := wc.NewBranch(ctx, work); err != nil {
@@ -271,10 +272,11 @@ func (ap *Applier) setupSite(ctx context.Context, site, key string, st *Setup) e
// updates it if it's there: used for the open metrics page. The build
// checks the page comes out.
func (ap *Applier) PublishPage(ctx context.Context, pagePath, title, description, body, why string) (*gitea.Pull, string, error) {
wc, full, branch, err := ap.workingCopy(ctx)
wc, full, branch, err := ap.WorkingCopy(ctx)
if err != nil {
return nil, "", err
}
defer wc.Release()
canBuild, note := buildCheck(ctx, wc)
pagePath = "/" + strings.Trim(pagePath, "/") + "/"
work := "supermarket/page" + strings.TrimSuffix(strings.ReplaceAll(pagePath, "/", "-"), "-")