Files
vue-journal-layer/testing/fixtures/acme/seo/resolve.json
Jakub Zych 289d031201 feat!: render the post page on the shared SEO layer with one H1 in both Journal H1 modes (tracer)
- extend vue-seo-layer (link dependency during development) and drop
  @nuxtjs/seo: the page head, canonical and the one JSON-LD graph come
  from the CMS resolve answer; the post's own title, excerpt and image
  apply only while there is no CMS answer
- remove the journal sitemap source and the copied shared purge route,
  library and plugin (the SEO layer serves POST /api/__site__/cache/purge);
  the deprecated POST /api/__journal__/cache/purge keeps working
- post title is h1 while the Journal API reports content_h1_to_h2 on
  (or absent) and p.journal-post__title while off; journal.postTitleTag
  ('auto' | 'h1' | 'p') overrides it; body h1 headings are demoted to h2
  while the setting is on (gateJournalHtml/sanitizeJournalHtml demoteH1)
- journal.breadcrumbs option and post-title CSS tokens
- smoke harness: count=, header=, noheader= and resolves lines; the
  fixture API also answers the SEO resolve and site endpoints

BREAKING CHANGE: the layer no longer installs @nuxtjs/seo (no
nuxt-site-config, nuxt-schema-org, robots or sitemap module, no
/api/__sitemap__/journal source, no useSiteConfig()); apps take their
head, sitemaps and robots from the SEO plugin through vue-seo-layer.
2026-11-04 13:37:11 +01:00

413 lines
10 KiB
JSON

{
"/blog/hello-acme": {
"action": "ok",
"status": 200,
"url": "https://acme.test/blog/hello-acme",
"locale": "en",
"staging": false,
"seo": {
"title": "Hello Acme | Acme Blog",
"description": "Acme says hello and introduces its blog.",
"canonical": "https://acme.test/blog/hello-acme",
"robots": "index, follow",
"x_robots_tag": "",
"og": {
"title": "Hello Acme",
"description": "Acme says hello and introduces its blog.",
"image": "",
"url": "https://acme.test/blog/hello-acme",
"locale": "en_US",
"locale_alternates": []
},
"twitter": {
"card": "summary_large_image",
"site": ""
},
"verification": []
},
"html_lang": "en",
"alternates": [],
"jsonld": {
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://acme.test/#website",
"url": "https://acme.test/",
"name": "Acme Blog"
},
{
"@type": "WebPage",
"@id": "https://acme.test/blog/hello-acme#webpage",
"url": "https://acme.test/blog/hello-acme",
"name": "Hello Acme",
"isPartOf": {
"@id": "https://acme.test/#website"
}
},
{
"@type": "BlogPosting",
"@id": "https://acme.test/blog/hello-acme#article",
"headline": "Hello Acme",
"mainEntityOfPage": {
"@id": "https://acme.test/blog/hello-acme#webpage"
}
}
]
},
"breadcrumbs": [
{
"name": "Home",
"url": "https://acme.test/",
"path": "/"
},
{
"name": "Blog",
"url": "https://acme.test/blog",
"path": "/blog"
},
{
"name": "Hello Acme",
"url": "https://acme.test/blog/hello-acme",
"path": "/blog/hello-acme"
}
]
},
"/blog/heading-on": {
"action": "ok",
"status": 200,
"url": "https://acme.test/blog/heading-on",
"locale": "en",
"staging": false,
"seo": {
"title": "Heading On Sample | Acme Blog",
"description": "Heading On Sample shows the Journal H1 setting on.",
"canonical": "https://acme.test/blog/heading-on",
"robots": "index, follow",
"x_robots_tag": "",
"og": {
"title": "Heading On Sample",
"description": "Heading On Sample shows the Journal H1 setting on.",
"image": "",
"url": "https://acme.test/blog/heading-on",
"locale": "en_US",
"locale_alternates": []
},
"twitter": {
"card": "summary_large_image",
"site": ""
},
"verification": []
},
"html_lang": "en",
"alternates": [],
"jsonld": {
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://acme.test/#website",
"url": "https://acme.test/",
"name": "Acme Blog"
},
{
"@type": "WebPage",
"@id": "https://acme.test/blog/heading-on#webpage",
"url": "https://acme.test/blog/heading-on",
"name": "Heading On Sample",
"isPartOf": {
"@id": "https://acme.test/#website"
}
},
{
"@type": "BlogPosting",
"@id": "https://acme.test/blog/heading-on#article",
"headline": "Heading On Sample",
"mainEntityOfPage": {
"@id": "https://acme.test/blog/heading-on#webpage"
}
}
]
},
"breadcrumbs": [
{
"name": "Home",
"url": "https://acme.test/",
"path": "/"
},
{
"name": "Blog",
"url": "https://acme.test/blog",
"path": "/blog"
},
{
"name": "Heading On Sample",
"url": "https://acme.test/blog/heading-on",
"path": "/blog/heading-on"
}
]
},
"/blog/heading-off": {
"action": "ok",
"status": 200,
"url": "https://acme.test/blog/heading-off",
"locale": "en",
"staging": false,
"seo": {
"title": "Heading Off Sample | Acme Blog",
"description": "Heading Off Sample shows the Journal H1 setting off.",
"canonical": "https://acme.test/blog/heading-off",
"robots": "index, follow",
"x_robots_tag": "",
"og": {
"title": "Heading Off Sample",
"description": "Heading Off Sample shows the Journal H1 setting off.",
"image": "",
"url": "https://acme.test/blog/heading-off",
"locale": "en_US",
"locale_alternates": []
},
"twitter": {
"card": "summary_large_image",
"site": ""
},
"verification": []
},
"html_lang": "en",
"alternates": [],
"jsonld": {
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://acme.test/#website",
"url": "https://acme.test/",
"name": "Acme Blog"
},
{
"@type": "WebPage",
"@id": "https://acme.test/blog/heading-off#webpage",
"url": "https://acme.test/blog/heading-off",
"name": "Heading Off Sample",
"isPartOf": {
"@id": "https://acme.test/#website"
}
},
{
"@type": "BlogPosting",
"@id": "https://acme.test/blog/heading-off#article",
"headline": "Heading Off Sample",
"mainEntityOfPage": {
"@id": "https://acme.test/blog/heading-off#webpage"
}
}
]
},
"breadcrumbs": [
{
"name": "Home",
"url": "https://acme.test/",
"path": "/"
},
{
"name": "Blog",
"url": "https://acme.test/blog",
"path": "/blog"
},
{
"name": "Heading Off Sample",
"url": "https://acme.test/blog/heading-off",
"path": "/blog/heading-off"
}
]
},
"/blog": {
"action": "ok",
"status": 200,
"url": "https://acme.test/blog",
"locale": "en",
"staging": false,
"seo": {
"title": "Latest posts | Acme Blog",
"description": "Every post of the Acme blog.",
"canonical": "https://acme.test/blog",
"robots": "index, follow",
"x_robots_tag": "",
"og": {
"title": "Latest posts",
"description": "Every post of the Acme blog.",
"image": "",
"url": "https://acme.test/blog",
"locale": "en_US",
"locale_alternates": []
},
"twitter": {
"card": "summary_large_image",
"site": ""
},
"verification": []
},
"html_lang": "en",
"alternates": [],
"jsonld": {
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://acme.test/#website",
"url": "https://acme.test/",
"name": "Acme Blog"
},
{
"@type": "WebPage",
"@id": "https://acme.test/blog#webpage",
"url": "https://acme.test/blog",
"name": "Latest posts",
"isPartOf": {
"@id": "https://acme.test/#website"
}
}
]
},
"breadcrumbs": [
{
"name": "Home",
"url": "https://acme.test/",
"path": "/"
},
{
"name": "Blog",
"url": "https://acme.test/blog",
"path": "/blog"
}
]
},
"/blog?page=2": {
"action": "ok",
"status": 200,
"url": "https://acme.test/blog?page=2",
"locale": "en",
"staging": false,
"seo": {
"title": "Latest posts | Acme Blog",
"description": "Every post of the Acme blog, page 2.",
"canonical": "https://acme.test/blog?page=2",
"robots": "index, follow",
"x_robots_tag": "",
"og": {
"title": "Latest posts",
"description": "Every post of the Acme blog, page 2.",
"image": "",
"url": "https://acme.test/blog?page=2",
"locale": "en_US",
"locale_alternates": []
},
"twitter": {
"card": "summary_large_image",
"site": ""
},
"verification": []
},
"html_lang": "en",
"alternates": [],
"jsonld": {
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://acme.test/#website",
"url": "https://acme.test/",
"name": "Acme Blog"
},
{
"@type": "WebPage",
"@id": "https://acme.test/blog?page=2#webpage",
"url": "https://acme.test/blog?page=2",
"name": "Latest posts",
"isPartOf": {
"@id": "https://acme.test/#website"
}
}
]
},
"breadcrumbs": [
{
"name": "Home",
"url": "https://acme.test/",
"path": "/"
},
{
"name": "Blog",
"url": "https://acme.test/blog",
"path": "/blog"
}
],
"pagination": {
"form": "query",
"param": "page",
"page": 2
}
},
"/blog/author/jdoe": {
"action": "ok",
"status": 200,
"url": "https://acme.test/blog/author/jdoe",
"locale": "en",
"staging": false,
"seo": {
"title": "Jane Doe | Acme Blog",
"description": "Posts by Jane Doe.",
"canonical": "",
"robots": "index, follow",
"x_robots_tag": "",
"og": {
"title": "Jane Doe",
"description": "Posts by Jane Doe.",
"image": "",
"url": "https://acme.test/blog/author/jdoe",
"locale": "en_US",
"locale_alternates": []
},
"twitter": {
"card": "summary_large_image",
"site": ""
},
"verification": []
},
"html_lang": "en",
"alternates": [],
"jsonld": {
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://acme.test/#website",
"url": "https://acme.test/",
"name": "Acme Blog"
},
{
"@type": "WebPage",
"@id": "https://acme.test/blog/author/jdoe#webpage",
"url": "https://acme.test/blog/author/jdoe",
"name": "Jane Doe",
"isPartOf": {
"@id": "https://acme.test/#website"
}
}
]
},
"breadcrumbs": [
{
"name": "Home",
"url": "https://acme.test/",
"path": "/"
},
{
"name": "Blog",
"url": "https://acme.test/blog",
"path": "/blog"
}
]
}
}