Files
davidandClaude Opus 5.5 c36f786ae9 Fixes from the first round of TEST.md
SEO: a domain property (sc-domain:) covers every subdomain, so the shop,
Gitea and forum were counted as the website. What ranks, the morning
check, the Monday report, keywords, change candidates and the audit's
traffic now read only the website's own host (with or without www).
The report keeps pages worth a proposal apart from "Waiting for your
yes", explains only moves past the thresholds, and says "places up/down".

Also:
- Feed summaries drop the posts' scripts and styles.
- Spend you log can't be negative.
- Test and check buttons can't be clicked twice while they run.
- Previews show the site's web fonts and icon sprites.
- Backups are read without leaving -wal/-shm files; deleting one removes
  them, and leftovers are swept at start.
- The Overview's setup flags a CRM that Hermes can't reach.
- Import now says what came in; adding a prospect that exists says so;
  prospects can be deleted.
- Signal tags and brief addresses keep accented letters (Ü → u).
- Page errors start with a capital; clearer messages for bad uploads,
  CRM retry and cancel, keywords, and the finished audit.
- The module you're in stays unfolded in the sidebar.
- A picked keyword can be unpicked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 06:31:42 -07:00

30 lines
836 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Package slug makes the lower-case, hyphenated names used in addresses
// and campaign tags, keeping accented letters as their plain ones
// ("Ünïcode" → "unicode") instead of dropping them.
package slug
import (
"regexp"
"strings"
"unicode"
"golang.org/x/text/unicode/norm"
)
// Letters that don't come apart into a plain letter and an accent.
var special = strings.NewReplacer("ß", "ss", "æ", "ae", "œ", "oe", "ø", "o", "đ", "d", "ð", "d", "ł", "l", "þ", "th", "ı", "i")
var nonSlug = regexp.MustCompile(`[^a-z0-9]+`)
// Make turns s into a slug.
func Make(s string) string {
s = special.Replace(strings.ToLower(s))
var b strings.Builder
for _, r := range norm.NFD.String(s) {
if !unicode.Is(unicode.Mn, r) {
b.WriteRune(r)
}
}
return strings.Trim(nonSlug.ReplaceAllString(b.String(), "-"), "-")
}