diff --git a/.playground/nuxt.config.ts b/.playground/nuxt.config.ts index cb4d490..257f89d 100644 --- a/.playground/nuxt.config.ts +++ b/.playground/nuxt.config.ts @@ -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 }, }) diff --git a/README.md b/README.md index eec8175..5ddd27a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ pnpm add git+https://git.golem15.com/golem15/vue-menu-layer.git#v0.2.0 The layer is consumed with `extends: ['vue-menu-layer']`. It reads one route of the menu plugin's anonymous API, `GET /_menu/api/v1/menus/{code}`, during SSR, so the first paint already has the menu, and renders it with ``. Editors manage menus in the SummerCMS admin; the site needs no menu data of its own. +The layer extends [vue-seo-layer](https://git.golem15.com/golem15/vue-seo-layer), which sets every page's head from the SummerCMS SEO plugin and serves the shared site cache purge route; an app that extends vue-menu-layer gets it with no extra entry in `extends`. + The layer is neutral: it ships no site colours, no site copy and no Nuxt modules. Its look comes from `--menu-*` CSS custom properties, which an app overrides, and every component can be replaced by a file of the same name in the app. ## Features @@ -20,7 +22,7 @@ The layer is neutral: it ships no site colours, no site copy and no Nuxt modules - **Active state**: the entry whose URL path equals the current route path (decoded, query, hash and trailing slash ignored; an absolute URL only on the request host) gets `aria-current="page"` and `menu-nav__link--active`; its ancestors get `menu-nav__item--trail`. - **Dividers**: `aria-hidden` list items, a horizontal line in panels and a short vertical line at the top level on the desktop. - **Empty states**: a missing menu (404), a failed request or a menu without entries renders nothing, or the `#fallback` slot. There is never an empty `