// One head entry for the whole app, following the resolve answer of the // current page (useCmsSeo). tagPriority 'critical' makes its tags win over // the same tags a page or another module sets (unhead keeps the lower // weight), so editor values from the SEO plugin override the content // defaults; a value the answer lacks leaves the page's own tag in place. // // The answer comes from the route middleware (seo.global.ts): during SSR it // is the one the Nitro middleware already resolved (event.context.seo), kept // in useState so hydration fetches nothing; on client navigation it is // fetched again. import { seoEnabled } from '../utils/seo.ts' export default defineNuxtPlugin(() => { const config = useRuntimeConfig() if (!seoEnabled(config.public.seo)) return useCmsSeo(useSeoAnswer()) })