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

Previews

See a branch of your website before it's merged. Supermarket builds the branch with Hugo, drafts included, and serves it here. Your live site isn't touched. Pull requests from Supermarket are branches too, so this is where you check a new page.

{{if not .Sites}}

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

{{else}} {{if gt (len .Sites) 1}}{{end}} {{if not .Hugo}}

There's no Hugo in Supermarket's image, so previews can't be built.

{{end}} {{with .Current}}{{$cur := .}} {{if .Err}}

{{.URL}}: {{.Err}}. Set it under Settings → Profile.

{{else if not $d.HasSynced}}

Read {{.Repo}} under Sections and pages first.

{{else}}

Branches of {{.Repo}}, as of the last read {{ago $d.Synced.At}}. Building reads the repository again first, so it builds the branch's latest commit. A preview can't send anything anywhere or change anything in Supermarket, and analytics don't count it.

{{range $d.Rows}} {{end}}
BranchLatest commitPreview
{{.Name}}{{if .Published}} published{{end}} {{.Subject}}
{{ago .At}}
{{with .Preview}} {{if .Commit}}Built {{ago .At}}{{end}} {{with .Err}}
The last build failed: {{.}}{{end}} {{else}}None yet{{end}} {{if .Stale}}
The branch has moved on since.{{end}}
{{with .Link}}Open preview ↗{{end}}
{{if .Preview}}
{{end}}
{{end}} {{end}} {{end}} {{end}}{{end}}