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

Your site

What your website is built from. Its pages are lists of sections, and each section type has its own layout in the site's repository. Supermarket reads those types, the fields they take and how your pages use them, and builds new pages only from them. It changes the site only through pull requests; merging publishes.

{{if not .Sites}}

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

{{else}} {{if gt (len .Sites) 1}}{{end}} {{with .Current}}{{$cur := .}}
{{if .Err}}

{{.URL}}: {{.Err}}. Set it under Settings → Profile (the repository as owner/name).

{{else}}
{{.URL}} from {{.Repo}}{{with $d.Synced.Branch}}, branch {{.}}{{end}}

{{if $d.HasSynced}}{{if not $d.Synced.At.IsZero}}Read from the repository {{ago $d.Synced.At}}.{{end}}{{else}}Not read yet.{{end}}

{{with $d.Synced.Err}}

The last read failed: {{.}}

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

Supermarket reads the repository with your Gitea token: save one under Settings → Search engines.

{{end}} {{end}}
{{end}} {{with .Catalog}} {{with $d.Commits}}

Latest on the published branch

{{range .}}{{end}}
WhenWhoWhat
{{ago .At}}{{.Author}}{{.Subject}}
{{end}}

Section types

{{len .Types}} types{{with .Helpers}}, sharing {{join . ", "}}{{end}}. Most used first. Open one to see the fields it takes and a real example.

{{range .Types}}
{{.Name}} {{if .Uses}}{{.Uses}} use{{if ne .Uses 1}}s{{end}} on {{len .Pages}} page{{if ne (len .Pages) 1}}s{{end}}{{else}}not used yet{{end}}{{if .Missing}} no layout{{end}} {{if .Missing}}

Pages use this type, but there's no layouts/partials/sections/{{.Name}}.html, so it won't show. Supermarket won't use it.

{{end}} {{with .Doc}}

The README says: {{ticks .}}

{{end}} {{if .Fields}}

Fields in use: {{range $i, $f := .Fields}}{{if $i}}, {{end}}{{$f.Name}}{{with $f.Items}} (items: {{join . ", "}}){{end}}{{end}}

{{end}} {{with .Layout}}

The layout reads: {{join . ", "}}

{{end}} {{with .Pages}}

On: {{join . ", "}}

{{end}} {{with .Example}}
{{.}}
{{end}}
{{end}}

Pages

{{with $d.SectionPages}}
{{range .}}{{end}}
AddressTitleSections
{{.Path}}{{if .Draft}} draft{{end}}{{.Title}}{{join .Types " · "}}
{{else}}

No page is built from sections yet.

{{end}} {{with $d.OtherPages}}
{{len .}} other pages, written in Markdown
{{range .}}{{end}}
AddressTitle
{{.Path}}{{if .Draft}} draft{{end}}{{.Title}}
{{end}} {{end}} {{end}} {{end}}{{end}}