{{define "content"}}{{with .Data}}{{$d := .}}

Publishing

Merging a pull request on Gitea publishes it: your Gitea hook deploys the site. Supermarket follows its pull requests, and after a merge checks the live site until the page is there, with its title and its own words, or, for a removal, gone. It checks every 30 minutes, and whenever you open the page.

{{if not .Sites}}

Add your website and its Hugo repository under Settings → Profile first.

{{else}} {{if gt (len .Sites) 1}}{{end}} {{with .Current}} {{if .Err}}

{{.URL}}: {{.Err}}.

{{else}}

Waiting for the live site

{{with $d.Waiting}}
{{range .}}{{end}}
PageMergedLast check
{{or .Title .Path}}
{{.Address}}
{{if eq .Status "removed"}}removal {{end}}{{if not .MergedAt.IsZero}}{{ago .MergedAt}}{{end}} {{if .Late $d.Now}}{{.LiveNote}} Over two hours since the merge: check that the deploy ran.{{else}}{{or .LiveNote "Not checked yet."}}{{end}}
{{else}}

Nothing waiting: every merged page is on the live site.

{{end}} {{with $d.Open}}

Pull requests waiting for you

{{end}}

Recent merges

{{with $d.PullsErr}}

Couldn't read the pull requests from Gitea: {{.}}

{{end}} {{if not $d.Gitea}}

Save a Gitea token under Settings → Search engines to see them.

{{else}}{{with $d.Merges}}
{{range .}}{{end}}
MergedPull requestFromOn the live site
{{with .MergedAt}}{{ago .}}{{end}} {{.Title}}
{{.Head.Ref}}
{{if .Ours}}Supermarket{{else}}{{.User.Login}}{{end}} {{with .Page}}{{template "page-status" .}}{{else}}—{{end}}

SEO changes and briefs follow their own pages to the live site, under SEO → Changes and Briefs and pages.

{{else}}

No merged pull requests yet. Changes pushed straight to the published branch aren't pull requests: they're under Sections and pages, in the latest commits.

{{end}}{{end}} {{end}} {{end}} {{end}} {{end}}{{end}}