Phase 3 part 4: changes approved one at a time, as Gitea pull requests
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>
This commit is contained in:
@@ -65,6 +65,7 @@ type PageReport struct {
|
||||
Error string `json:"error,omitempty"`
|
||||
internalLinks []string
|
||||
externalLinks []string
|
||||
text string
|
||||
}
|
||||
|
||||
// Check is a site-wide pass or fail, for AI visibility and the basics.
|
||||
@@ -469,7 +470,14 @@ func readPage(p *PageReport, pageURL string, body []byte) {
|
||||
}
|
||||
}
|
||||
walk(doc, false, false)
|
||||
p.TextChars = len([]rune(strings.Join(strings.Fields(text.String()), " ")))
|
||||
p.text = strings.Join(strings.Fields(text.String()), " ")
|
||||
p.TextChars = len([]rune(p.text))
|
||||
}
|
||||
|
||||
// readPageText parses a page and returns its visible text.
|
||||
func readPageText(p *PageReport, pageURL string, body []byte) string {
|
||||
readPage(p, pageURL, body)
|
||||
return p.text
|
||||
}
|
||||
|
||||
func attr(n *html.Node, key string) string {
|
||||
|
||||
Reference in New Issue
Block a user