feat: public API, SEO and existing surfaces
This commit is contained in:
1 parent
45fbbc33b1
commit
c390fcfe8d
103 files changed
+4476
-231
No files matched your search
@@ -23,11 +23,11 @@ func TestSeoOutputResolver(t *testing.T) {
|
||||
}
|
||||
object := decodeSeoObject(t, rec)
|
||||
cases := map[string]string{
|
||||
"": "authors,canonical_url,description,fallbacks,image,json_ld,modified_at,og,published_at,robots,title,twitter",
|
||||
"og": "description,image,image_alt,locale,site_name,title,type,url",
|
||||
"": "alternates,authors,canonical_url,description,fallbacks,image,json_ld,lang,modified_at,og,published_at,robots,title,twitter",
|
||||
"og": "description,image,image_alt,locale,locale_alternates,site_name,title,type,url",
|
||||
"twitter": "card,description,image,image_alt,title",
|
||||
"image": "alt,source,url",
|
||||
"fallbacks": "canonical,description,image,title",
|
||||
"fallbacks": "canonical,description,image,site_text_skipped,title",
|
||||
}
|
||||
for key, want := range cases {
|
||||
target := object
|
||||
@@ -49,9 +49,9 @@ func TestSeoOutputResolver(t *testing.T) {
|
||||
want := map[string]any{
|
||||
"title": title, "description": "We price by the square metre.", "canonical_url": url, "robots": "index, follow",
|
||||
"image": map[string]any{"url": image, "alt": "", "source": "site"},
|
||||
"og": map[string]any{"type": "article", "title": title, "description": "We price by the square metre.", "image": image, "image_alt": "", "url": url, "site_name": "Renew", "locale": "en"},
|
||||
"og": map[string]any{"type": "article", "title": title, "description": "We price by the square metre.", "image": image, "image_alt": "", "url": url, "site_name": "Renew", "locale": "en", "locale_alternates": []any{}},
|
||||
"twitter": map[string]any{"card": "summary_large_image", "title": title, "description": "We price by the square metre.", "image": image, "image_alt": ""},
|
||||
"fallbacks": map[string]any{"title": "title", "description": "body", "image": "site", "canonical": "site"},
|
||||
"fallbacks": map[string]any{"title": "title", "description": "body", "image": "site", "canonical": "site", "site_text_skipped": false},
|
||||
"published_at": "2026-09-01T08:00:00Z", "modified_at": "2026-09-10T09:30:00Z",
|
||||
}
|
||||
for key, expected := range want {
|
||||
|
||||
Reference in new issue
Block a user