feat(web): Go W-G7 RSS, sitemap, redirect, and SEO bags
Add paginate/meta wiring, RSS and sitemap builders, and app redirect/error/sitemap/robots route bags so content and W7 offline smokes pass on libweb.so. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
fe18c4d1d6
commit
23e4bc406e
11 files changed
+758
-1
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package rss
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBuildRSSContainsItem(t *testing.T) {
|
||||
items := []any{
|
||||
map[string]any{"title": "Hi", "slug": "/post/a", "summary": "text"},
|
||||
}
|
||||
xml := BuildRSS("Blog", "http://example.com", "Feed", items)
|
||||
if !strings.Contains(xml, "<rss") {
|
||||
t.Fatalf("missing rss root: %s", xml)
|
||||
}
|
||||
if !strings.Contains(xml, "<title>Hi</title>") {
|
||||
t.Fatalf("missing item title: %s", xml)
|
||||
}
|
||||
if !strings.Contains(xml, "http://example.com/post/a") {
|
||||
t.Fatalf("missing full link: %s", xml)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user