@marvalt/digivalt-core 0.2.32 → 0.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.33] - 2026-09-19
9
+
10
+ ### Added
11
+ - **`docs/SEO-AIO.md`** — developer/AI playbook for DigiValt SEO plugin + env + prerender. Linked from `docs/README.md` and `SEO-PERFORMANCE.md`.
12
+
13
+ **Publish/deploy:** publish **`@marvalt/digivalt-core@0.2.33`**. No required app code change; upgrade when you want the packaged handbook.
14
+
8
15
  ## [0.2.32] - 2026-09-18
9
16
 
10
17
  ### Added
package/README.md CHANGED
@@ -30,7 +30,7 @@ The root package export remains as a thin compatibility layer for generator-focu
30
30
 
31
31
  - **Subpath:** `import { DigiValtRouteSeo, DigiValtSeoHead, JsonLd, buildPageJsonLd, ... } from '@marvalt/digivalt-core/seo'`
32
32
  - **Peer dependency:** `react-helmet-async` (v2+). Wrap the app in **`HelmetProvider`**.
33
- - **Env:** **`VITE_SEO_*`** site identity (`VITE_SEO_SITE_URL`, `VITE_SEO_SITE_NAME`, `VITE_SEO_DEFAULT_TITLE`, …). Per-URL fields come from WordPress **`digivalt_seo`**. See **[docs/SEO-PERFORMANCE.md](./docs/SEO-PERFORMANCE.md)**.
33
+ - **Env:** **`VITE_SEO_*`** site identity. Per-URL fields come from WordPress **`digivalt_seo`**. Playbook: **[docs/SEO-AIO.md](./docs/SEO-AIO.md)**. Env table / PageSpeed: **[docs/SEO-PERFORMANCE.md](./docs/SEO-PERFORMANCE.md)**.
34
34
  - **Config:** `getSEOConfig()` / `getPerformanceConfig()` in `@marvalt/digivalt-core/config` read the same `VITE_*` values.
35
35
 
36
36
  ## Init Workflow
package/docs/README.md CHANGED
@@ -7,7 +7,8 @@ Read these in order for DigiValt app setup, deploy, and SEO.
7
7
  | [ENVIRONMENT.md](./ENVIRONMENT.md) | Devs + DevOps | Env vars, `.env` model, Cloudflare secrets, React 19 install |
8
8
  | [AI-LOCAL-WORDPRESS-BOOTSTRAP.md](./AI-LOCAL-WORDPRESS-BOOTSTRAP.md) | Humans | Local WordPress handover runbook |
9
9
  | [AI-MASTER-PROMPT.md](./AI-MASTER-PROMPT.md) | AI tools | Vite + Cloudflare scaffold prompt |
10
- | [SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md) | Devs | `DigiValtRouteSeo`, sitemap, prerender, `VITE_SEO_*` |
10
+ | [SEO-AIO.md](./SEO-AIO.md) | Devs + AI | End-to-end SEO/AIO: WP plugin, env, `DigiValtRouteSeo`, generate, prerender |
11
+ | [SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md) | Devs | `VITE_SEO_*` table, sitemap XML, PageSpeed |
11
12
  | [PATH-MOUNT.md](./PATH-MOUNT.md) | Devs | Path mounts via digivalt-uworker + Vite `base` + `withBasePath` |
12
13
  | [CLOUDFLARE-STREAM.md](./CLOUDFLARE-STREAM.md) | Devs | Stream helpers + `CloudflareStreamPlayer` (`/media`) |
13
14
  | [SHORTCODES.md](./SHORTCODES.md) | Devs + editors | How WP shortcodes are parsed and merged; links to adapter docs |
@@ -20,7 +21,7 @@ Package root [README.md](../README.md) covers `digivalt-init`, generators, and e
20
21
  | Subpath | Use |
21
22
  |---------|-----|
22
23
  | `@marvalt/digivalt-core/generators` | Build-time static data (`generateAllData`) |
23
- | `@marvalt/digivalt-core/seo` | `DigiValtSeoHead`, JSON-LD helpers |
24
+ | `@marvalt/digivalt-core/seo` | `DigiValtRouteSeo`, `DigiValtSeoHead`, JSON-LD helpers |
24
25
  | `@marvalt/digivalt-core/registry` | Page-body registry, `DigiValtWpPage`, providers |
25
26
  | `@marvalt/digivalt-core/integrations` | Browser-only: `DigiValtTracker`, `MauticTracking`, `ChatwootWidget` |
26
27
  | `@marvalt/digivalt-core/media` | Cloudflare Stream helpers + `CloudflareStreamPlayer` |
@@ -0,0 +1,59 @@
1
+ # SEO / AIO in DigiValt apps
2
+
3
+ Playbook for **developers and AI agents** wiring `@marvalt/digivalt-core` with the **DigiValt SEO** WordPress plugin. Content-manager steps: `digivalt-collaboration-docs/DIGIVALT_SEO_AIO.md`. Env tables and PageSpeed: [SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md). REST field list: WordPress plugin `digivalt-seo/README.md`.
4
+
5
+ ## What “good” looks like
6
+
7
+ - **Site identity** in `VITE_SEO_*` (one set per frontend / Cloudflare project).
8
+ - **Per-URL** overrides in WordPress `digivalt_seo` (pages, posts, public REST CPTs).
9
+ - **Same HTML** for humans and crawlers: prerender snapshots, not user-agent cloaking, not Yoast.
10
+ - Visible copy and JSON-LD stay in sync (same generate JSON).
11
+
12
+ ## Install
13
+
14
+ | Piece | Action |
15
+ |-------|--------|
16
+ | WordPress | Activate **DigiValt SEO**. Editors get a meta box and a Dashboard widget. |
17
+ | App | `@marvalt/digivalt-core` with `react-helmet-async`. `npx digivalt-init` for sitemap/robots Functions and `scripts/prerender-seo.ts`. |
18
+ | PageSync | Plugin ≥ 1.1.2 if briefs should seed `_digivalt_seo_*` meta. |
19
+
20
+ ## Env vs WordPress
21
+
22
+ Keep in env: `VITE_SEO_SITE_URL`, `SITE_NAME`, `DEFAULT_*`, Twitter/Facebook, verification, optional `VITE_SEO_ROUTE_PREFIXES`, `VITE_SEO_FRONT_PAGE_SLUG`, `VITE_PHPLIST_NEWSLETTER_ROUTE_BASE`.
23
+
24
+ Never put per-page title/description in env.
25
+
26
+ ## App checklist
27
+
28
+ ```tsx
29
+ import { DigiValtRouteSeo } from '@marvalt/digivalt-core/seo';
30
+
31
+ <DigiValtRouteSeo pathname="/about" entity={page} />
32
+ ```
33
+
34
+ - One instance per route. Pass the WordPress object from static JSON (`digivalt_seo` is already on it after generate).
35
+ - Utility routes (`subscribe`, `preferences`, 404): `noindex` and **omit** from `sitemap-static-paths.json`.
36
+ - Front page: app `/` + `VITE_SEO_FRONT_PAGE_SLUG` or WP Reading Settings `front_page`, never also `/<frontpage-slug>` in the sitemap.
37
+
38
+ `resolvePageSeo` / `buildPageJsonLd` if you need props without the React helper.
39
+
40
+ ## Generate and deploy
41
+
42
+ `generateAllData()` (including fixture mode) writes:
43
+
44
+ - `public/sitemap-paths.json` — `{ urls: [{ path, lastmod?, image? }] }`
45
+ - `public/seo-manifest.json` — titles, descriptions, JSON-LD, body HTML for snapshots
46
+
47
+ Then `vite build` then `prerenderSeoHtml()` → `dist/index.html` and `dist/{path}/index.html`.
48
+
49
+ Cloudflare Pages Functions serve `/sitemap.xml` and `/robots.txt`. Do not commit those as static files.
50
+
51
+ CPT URLs other than pages are **opt-in**: `VITE_SEO_ROUTE_PREFIXES=eventbrite_event:/events,member:/members/profile`.
52
+
53
+ ## AI agents: do not
54
+
55
+ - Do not add Yoast/Rank Math.
56
+ - Do not serve different HTML to bots vs users.
57
+ - Do not invent `changefreq` / `priority`.
58
+ - Do not hand-edit `sitemap-paths.json` or `seo-manifest.json`.
59
+ - Do not register DigiValt SEO fields as WordPress PHP shortcodes.
@@ -2,6 +2,8 @@
2
2
 
3
3
  This guide is for **Vite + React** apps that use DigiValt static generation. It complements WordPress content with **document metadata**, **structured data**, and **performance-minded image/font patterns**.
4
4
 
5
+ **How the system fits together** (WP vs env, prerender, editor workflow): **[SEO-AIO.md](./SEO-AIO.md)**. Team handbook: `digivalt-collaboration-docs/DIGIVALT_SEO_AIO.md`.
6
+
5
7
  ## Prerequisites
6
8
 
7
9
  1. Install the peer dependency (required for `DigiValtSeoHead`):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marvalt/digivalt-core",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "description": "Core glue logic and shared context for DigiVAlt frontend applications",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "main": "dist/index.cjs",