feat!: extend the SEO layer and drop the copied purge route

- extend vue-seo-layer (link dependency during development); every page
  takes its head from the SEO plugin through it
- remove the copied shared purge route, library, plugin and their test:
  POST /api/__site__/cache/purge comes from vue-seo-layer with the same
  contract and environment variables
- the page-less playground sets seo.htmlSitemap false; the smoke points
  NUXT_SEO_API_BASE at the fixture API (fails open)

BREAKING CHANGE: server/api/__site__/cache/purge.post.ts,
server/lib/siteCachePurge.ts and server/plugins/site-cache-purge.ts are
no longer in this layer, and the runtime keys cachePurge and siteCache
are declared by vue-seo-layer. An app without pages sets
seo.htmlSitemap false.
This commit is contained in:
Jakub Zych
2026-11-04 14:00:04 +01:00
parent 1f23340a2f
commit cb321e9437
10 changed files with 132 additions and 891 deletions

View File

@@ -3,4 +3,8 @@
export default defineNuxtConfig({
extends: ['..'],
compatibilityDate: '2025-07-15',
// An app without pages: vue-seo-layer's HTML sitemap pages would be its
// only routes and turn the router on, so every other path would answer
// 404. A site with pages keeps them.
seo: { htmlSitemap: false },
})