{{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.Theme}}

The theme

{{if .Outdated}}

This site has Supermarket's theme version {{.Version}}; Supermarket has version {{.Latest}}.

Opens a pull request that replaces the site's copy, checked with a build.
{{else}}

This site has Supermarket's theme, version {{.Version}}: the latest.

{{end}} {{with .Edited}}

Changed by hand in the site's copy of the theme: {{join . ", "}}. An update replaces them; such changes belong in the site's own layouts/ or static/, which win over the theme.

{{end}} {{with $d.ThemePR}}

Last update: the pull request ↗, {{ago .At}}.

{{end}}

First pages

This site uses Supermarket's theme. Build its pages: each is written from your profile, opens for you to edit and preview, and goes to the site as a pull request.

{{range $d.Kinds}}
{{end}} {{range $d.Products}}
{{end}}

Each uses the AI (a paid call). About and Contact join the top menu; Contact has a lead form: connect it under Lead forms.

{{end}} {{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}}
{{if $d.Conv}}{{end}}{{range .}}{{if $d.Conv}}{{with conv $d.Conv .Path}}{{end}}{{end}}{{end}}
AddressTitleSectionsVisitsSign-ups
{{.Path}}{{if .Draft}} draft{{end}}{{.Title}}{{join .Types " · "}}{{num .Visitors}}{{if .Conversions}}{{num .Conversions}}{{else}}0{{end}}
{{else}}

No page is built from sections yet.

{{end}} {{with $d.OtherPages}}
{{len .}} other pages, written in Markdown
{{if $d.Conv}}{{end}}{{range .}}{{if $d.Conv}}{{with conv $d.Conv .Path}}{{end}}{{end}}{{end}}
AddressTitleVisitsSign-ups
{{.Path}}{{if .Draft}} draft{{end}}{{.Title}}{{num .Visitors}}{{if .Conversions}}{{num .Conversions}}{{else}}0{{end}}
{{end}} {{end}} {{end}} {{end}}{{end}}