44 lines
1.8 KiB
TypeScript
44 lines
1.8 KiB
TypeScript
// vue-seo-layer: the frontend half of the SummerCMS SEO plugin
|
|
// (golem15.seo). For every page it asks GET /_seo/api/v1/resolve?url=…,
|
|
// enforces the redirect and 410 decisions, and sets the head (title,
|
|
// description, canonical, robots, Open Graph, X/Twitter, verification) from
|
|
// the answer with priority over the page's own tags. It also reports 404s to
|
|
// the plugin's log and serves the verification files at the site root. An
|
|
// app consumes it with `extends: ['vue-seo-layer']`.
|
|
//
|
|
// Every path below is absolute and built from this file's directory: a
|
|
// relative or ~ path in a layer config resolves against the consuming
|
|
// project, not the layer. The layer declares no Nuxt modules.
|
|
|
|
export default defineNuxtConfig({
|
|
compatibilityDate: '2025-07-15',
|
|
devtools: { enabled: false },
|
|
|
|
runtimeConfig: {
|
|
seo: {
|
|
// Server-only base for SSR calls (NUXT_SEO_API_BASE). It never comes
|
|
// from request input.
|
|
apiBase: 'http://127.0.0.1:8096/_seo/api/v1',
|
|
// Server-only bearer token of POST /notfound (NUXT_SEO_NOTFOUND_TOKEN),
|
|
// the backend's golem15.seo.notfound_token. Empty: 404s are not
|
|
// reported. Not under NUXT_SITE_: nuxt-site-config copies every
|
|
// NUXT_SITE_* variable into the site config, which is published in
|
|
// every page's payload.
|
|
notfoundToken: '',
|
|
// How long a resolve call may take before the page renders without it
|
|
// (NUXT_SEO_TIMEOUT_MS).
|
|
timeoutMs: 1500,
|
|
},
|
|
public: {
|
|
seo: {
|
|
// Same-origin base for browser navigations (NUXT_PUBLIC_SEO_API_BASE).
|
|
// The site's proxy routes GET <base>/resolve to the backend.
|
|
apiBase: '/_seo/api/v1',
|
|
// NUXT_PUBLIC_SEO_ENABLED=false turns the layer off: no resolve
|
|
// calls, no head, no redirects, no 404 reports.
|
|
enabled: true,
|
|
},
|
|
},
|
|
},
|
|
})
|