diff --git a/README.md b/README.md index 8510446..23ead1f 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,11 @@ A Nuxt 4 layer that renders a menu of the SummerCMS menu plugin as an accessible site navigation. ```bash -pnpm add git+https://git.golem15.com/golem15/vue-menu-layer.git#v0.5.0 +pnpm add git+https://git.golem15.com/golem15/vue-seo-layer.git#v0.2.0 git+https://git.golem15.com/golem15/vue-menu-layer.git#v0.5.1 ``` +vue-seo-layer is a peer dependency (`^0.2.0`): the app lists it next to the layer, pinned to a tag as above, and needs no `extends` entry for it (the layer extends it). The layer cannot bring it itself: pnpm refuses a git dependency inside another package (`blockExoticSubdeps`, on by default). + ## Overview 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. @@ -79,6 +81,7 @@ The purge route `POST /api/__site__/cache/purge` that the SummerCMS backend call ### Upgrading from 0.4 +- **List vue-seo-layer in the app** (from 0.5.1): `"vue-seo-layer": "git+https://git.golem15.com/golem15/vue-seo-layer.git#v0.2.0"` next to `vue-menu-layer#v0.5.1`. It is a peer dependency of the layer (`^0.2.0`). 0.5.0 listed it as its own git dependency, which pnpm refuses by default (`ERR_PNPM_EXOTIC_SUBDEP`), so use 0.5.1. - The layer extends vue-seo-layer. Nothing is needed in the app's `extends`, but every page now resolves through the SEO plugin (`GET /_seo/api/v1/resolve`) and takes its head from the answer; set `NUXT_SEO_API_BASE` when the backend is not on `http://127.0.0.1:8096`, or `seo: { cms: false }` for a site without the SEO plugin. - `server/api/__site__/cache/purge.post.ts`, `server/lib/siteCachePurge.ts` and `server/plugins/site-cache-purge.ts` are removed from this layer: the same route, library and plugin come from vue-seo-layer, with the same environment variables. An app that imported `server/lib/siteCachePurge.ts` from this layer imports it from vue-seo-layer. - **HTML sitemap pages.** The layer brings vue-seo-layer's HTML sitemap pages (pl `/mapa-strony`, en `/sitemap` by default, set in `seo.htmlSitemap.paths`). An app that renders its pages through a root catch-all (`pages/[...slug].vue`, as with the pages plugin) gets none, so a CMS page at such a path is not shadowed, unless it sets `seo.htmlSitemap.overCatchAll: true`; an app with its own page at such a path keeps its page; `seo: { htmlSitemap: false }` turns them off. An app without pages of its own (only `app.vue`) gets none and needs no setting. @@ -137,7 +140,7 @@ pnpm dev # the playground in .playground/ ## Releasing -Commit, tag `vX.Y.Z` (annotated) and push the tag; apps pin `#vX.Y.Z` in their dependency. +Commit, tag `vX.Y.Z` (annotated) and push the tag; apps pin `#vX.Y.Z` in their dependency. vue-seo-layer is a peer dependency (`^0.2.0`) and a development dependency pinned to its tag, never a regular dependency (pnpm refuses a git dependency inside another package); vue-journal-layer's README, "Releasing", has the steps and the `--check-links` guard. ## Testing diff --git a/package.json b/package.json index 0933223..620755f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-menu-layer", - "version": "0.5.0", + "version": "0.5.1", "private": true, "type": "module", "main": "./nuxt.config.ts", @@ -14,15 +14,14 @@ "engines": { "node": ">=22.18" }, - "dependencies": { - "vue-seo-layer": "git+https://git.golem15.com/golem15/vue-seo-layer.git#v0.2.0" - }, "peerDependencies": { - "nuxt": "4.4.8" + "nuxt": "4.4.8", + "vue-seo-layer": "^0.2.0" }, "devDependencies": { "nuxt": "4.4.8", "typescript": "5.9.3", - "vue": "3.5.35" + "vue": "3.5.35", + "vue-seo-layer": "git+https://git.golem15.com/golem15/vue-seo-layer.git#v0.2.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e946d9e..721777e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,10 +7,6 @@ settings: importers: .: - dependencies: - vue-seo-layer: - specifier: git+https://git.golem15.com/golem15/vue-seo-layer.git#v0.2.0 - version: git+https://git.golem15.com/golem15/vue-seo-layer.git#3868f3d74dcebb7a35af43f1defcd68cfe2933b7(nuxt@4.4.8(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7(supports-color@10.2.2)))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7(supports-color@10.2.2)))(@oxc-project/types@0.133.0)(@vue/compiler-sfc@3.5.43)(cac@6.7.14)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1(supports-color@10.2.2))(magicast@0.5.5)(rollup-plugin-visualizer@7.1.1(rollup@4.64.2))(rollup@4.64.2)(srvx@0.11.22)(supports-color@10.2.2)(terser@5.51.2)(typescript@5.9.3)(vite@7.3.7(jiti@2.7.0)(terser@5.51.2))) devDependencies: nuxt: specifier: 4.4.8 @@ -21,6 +17,9 @@ importers: vue: specifier: 3.5.35 version: 3.5.35(typescript@5.9.3) + vue-seo-layer: + specifier: git+https://git.golem15.com/golem15/vue-seo-layer.git#v0.2.0 + version: git+https://git.golem15.com/golem15/vue-seo-layer.git#3868f3d74dcebb7a35af43f1defcd68cfe2933b7(nuxt@4.4.8(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7(supports-color@10.2.2)))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7(supports-color@10.2.2)))(@oxc-project/types@0.133.0)(@vue/compiler-sfc@3.5.43)(cac@6.7.14)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1(supports-color@10.2.2))(magicast@0.5.5)(rollup-plugin-visualizer@7.1.1(rollup@4.64.2))(rollup@4.64.2)(srvx@0.11.22)(supports-color@10.2.2)(terser@5.51.2)(typescript@5.9.3)(vite@7.3.7(jiti@2.7.0)(terser@5.51.2))) packages: