Proposals (at most 3 waiting) for pages on page one without clicks and for the audit's title and description issues: the AI writes the title (without the site's suffix, within the pixel budget) and description from the live page and its searches. A yes syncs a working copy of the site's Gitea repository (token as a header only), finds the page's Hugo content file, sets title and description in its front matter, builds with Hugo to check the page comes out as proposed, pushes a branch and opens a pull request; it never merges. Merged changes are checked on the live site, then compared before and after from Search Console. Hugo is in the image. Schema 15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
74 lines
4.3 KiB
HTML
74 lines
4.3 KiB
HTML
{{define "content"}}{{template "settings-start" .}}{{with .Data}}{{$d := .}}
|
|
<h2>Search engines</h2>
|
|
<p class="lede">Google Search Console is where Google says what it really shows for your sites: every number in SEO comes from it. Supermarket reads it (read-only) twice a day and keeps 16 months of it.</p>
|
|
|
|
<form method="post" action="/settings/search" autocomplete="off">
|
|
<section class="card" id="google">
|
|
<h3>Google Search Console</h3>
|
|
{{range .Fields}}{{template "key-field" (dict "F" . "Set" (index $d.Set .Name))}}{{end}}
|
|
<p class="help">Redirect URI to register on the OAuth client: <code id="google-redirect">{{.Redirect}}</code> <button type="button" class="link small" data-copy="google-redirect">Copy</button></p>
|
|
{{template "key-field" (dict "F" .Speed "Set" .SpeedSet)}}
|
|
{{if .Connected}}
|
|
<p class="ok">Connected{{with .Account}} as {{.}}{{end}}.</p>
|
|
<label class="check small"><input type="checkbox" name="remove:google.refresh_token"> disconnect</label>
|
|
{{end}}
|
|
</section>
|
|
|
|
{{if .Connected}}
|
|
<section class="card">
|
|
<h3>Your websites' properties</h3>
|
|
{{with .PropsError}}<p class="error">Couldn't list your properties: {{.}}</p>{{end}}
|
|
{{if .Sites}}
|
|
{{range .Sites}}
|
|
<label>{{.URL}}
|
|
<select name="property">
|
|
<option value="">none</option>
|
|
{{$cur := .Property}}{{range $d.Properties}}<option value="{{.URL}}" {{if eq .URL $cur}}selected{{end}}>{{.URL}}</option>{{end}}
|
|
{{if and $cur (not $d.Properties)}}<option value="{{$cur}}" selected>{{$cur}}</option>{{end}}
|
|
</select>
|
|
{{with .Last}}<span class="help {{if .Error}}error-text{{end}}">Synced {{ago .At}}{{if .Error}}: {{.Error}}{{else}}; data through {{.Through}}{{end}}.</span>{{end}}
|
|
</label>
|
|
{{end}}
|
|
{{else}}<p class="help">Add your websites to the <a href="/settings/profile">profile</a> first.</p>{{end}}
|
|
{{if not .Properties}}<p class="help">This account sees no verified properties. Add your site in Search Console, or sign in with the account that owns it.</p>{{end}}
|
|
</section>
|
|
{{end}}
|
|
|
|
<section class="card" id="gitea">
|
|
<h3>Gitea: your sites' repositories</h3>
|
|
<p class="small">For changes you approve: Supermarket pushes a branch to the website's Hugo repository (set in the <a href="/settings/profile">profile</a>) and opens a pull request. It never merges.</p>
|
|
<label>Gitea's address <input name="gitea_url" value="{{.GiteaURL}}" placeholder="https://gitea.example.com"></label>
|
|
{{template "key-field" (dict "F" .GiteaKey "Set" .GiteaSet)}}
|
|
{{if .GiteaSet}}
|
|
<button type="button" class="secondary small" hx-post="/settings/search/test/gitea" hx-target="#test-gitea" hx-indicator="#testing-gitea">Test</button>
|
|
<span id="testing-gitea" class="htmx-indicator">Checking…</span>
|
|
<div id="test-gitea"></div>
|
|
{{end}}
|
|
</section>
|
|
|
|
{{if .Connected}}{{$s := .SEO}}
|
|
<section class="card">
|
|
<h3>The morning check and the Monday report</h3>
|
|
<p class="small">A page or search counts as a real move when its clicks change by more than this many, or its position by more than this many places on at least this many impressions. Raise them if the check lists too much; on a small site an average position jumps as soon as one search appears or disappears.</p>
|
|
<div class="cols">
|
|
<label>Clicks, more than <input name="min_clicks" inputmode="numeric" value="{{$s.MinClicks}}" size="4"></label>
|
|
<label>Positions, more than <input name="min_positions" inputmode="decimal" value="{{$s.MinPositions}}" size="4"></label>
|
|
<label>On at least <input name="min_impressions" inputmode="numeric" value="{{$s.MinImpressions}}" size="6"> impressions</label>
|
|
</div>
|
|
<label class="check"><input type="checkbox" name="email_report" {{if $s.EmailReport}}checked{{end}}> Email me the Monday report (through the mailbox under <a href="/settings/email">Settings → Email</a>)</label>
|
|
</section>
|
|
{{end}}
|
|
|
|
<div class="actions">
|
|
<button type="submit">Save</button>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="actions">
|
|
{{if and (index .Set "google.client_id") (index .Set "google.client_secret")}}
|
|
<form method="post" action="/auth/google/start"><button type="submit" class="{{if .Connected}}secondary{{end}}">{{if .Connected}}Connect again{{else}}Connect Search Console{{end}}</button></form>
|
|
{{end}}
|
|
{{if .Connected}}<form method="post" action="/settings/search/sync" data-busy="Syncing…"><button type="submit" class="secondary">Sync now</button></form>{{end}}
|
|
</div>
|
|
{{end}}{{template "settings-end"}}{{end}}
|