Phase 7 part 3: suggestions from the funnel

A new package, next, finds the pages the funnel asks for: a landing page
for a signal with replies or interested people in 90 days and none yet;
a product or alternative page for an app two or more people name in
their replies (outreach email, origami.chat, explee.com) that the site
has no page for; and picked keywords with no brief, briefs left
unanswered. Sites → New pages can be filled in from a link (kind,
signal, notes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 07:13:38 -07:00
co-authored by Claude Opus 5.5
parent 77f6e1e1d1
commit 855615ae7f
4 changed files with 428 additions and 4 deletions
+3
View File
@@ -149,6 +149,9 @@ func (s *Server) sitePagesPage(w http.ResponseWriter, r *http.Request) {
func (s *Server) renderSitePages(w http.ResponseWriter, r *http.Request, errMsg string) {
all, cur := s.currentSite(r)
data := map[string]any{"Sites": all, "Current": cur, "Kinds": sites.Kinds, "Gitea": s.gitea() != nil}
// A suggestion (SEO → Next) can fill the form in: kind, signal, notes.
q := r.URL.Query()
data["Pre"] = map[string]string{"Kind": q.Get("kind"), "Signal": q.Get("signal"), "Notes": q.Get("notes")}
if cur != nil && cur.Repo != "" {
ps, err := sites.Pages(s.DB, cur.URL)
if err != nil {
+4 -4
View File
@@ -10,14 +10,14 @@
{{if .Err}}
<section class="card"><p class="warn-text">{{.URL}}: {{.Err}}. Set it under <a href="/settings/profile">Settings → Profile</a>.</p></section>
{{else}}
<form method="post" action="/sites/pages" class="card">
<form method="post" action="/sites/pages" class="card" id="new">
<h2>A new page</h2>
<input type="hidden" name="site" value="{{.Index}}">
{{if not $d.AI}}<p class="warn-text">Building pages needs the AI: choose a provider under <a href="/settings/ai">Settings → AI</a>.</p>{{end}}
{{if not $d.Gitea}}<p class="warn-text">Supermarket reads the site with your Gitea token: save one under <a href="/settings/search">Settings → Search engines</a>.</p>{{end}}
<div class="cols">
<label>Kind of page
<select name="kind">{{range $d.Kinds}}<option value="{{.ID}}">{{.Label}}</option>{{end}}</select>
<select name="kind">{{range $d.Kinds}}<option value="{{.ID}}" {{if eq .ID $d.Pre.Kind}}selected{{end}}>{{.Label}}</option>{{end}}</select>
</label>
<label>Address <span class="muted">(optional)</span> <input name="path" placeholder="/for-churches/"></label>
</div>
@@ -31,13 +31,13 @@
</div>
<div class="cols">
<label>Buying signal <span class="muted">(optional; its links get the signal's campaign tag)</span>
<select name="signal"><option value="">None</option>{{range $d.Signals}}<option value="{{.ID}}">{{.Name}}</option>{{end}}</select>
<select name="signal"><option value="">None</option>{{range $d.Signals}}<option value="{{.ID}}" {{if eq (printf "%d" .ID) $d.Pre.Signal}}selected{{end}}>{{.Name}}</option>{{end}}</select>
</label>
<label>SEO brief <span class="muted">(optional)</span>
<select name="brief"><option value="">None</option>{{range $d.Briefs}}<option value="{{.ID}}">{{.Keyword}}</option>{{end}}</select>
</label>
</div>
<label>What the page is for <textarea name="notes" rows="3" placeholder="Who it's for, what it should get them to do, anything it must or mustn't say."></textarea></label>
<label>What the page is for <textarea name="notes" rows="3" placeholder="Who it's for, what it should get them to do, anything it must or mustn't say.">{{$d.Pre.Notes}}</textarea></label>
<div class="actions">
<button type="submit" data-busy="Reading the site and writing…" {{if or (not $d.AI) (not $d.Gitea)}}disabled{{end}}>Build the page</button>
</div>