@wix/agent-skills 1.6.0 → 1.8.0
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/README.md +5 -9
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +51 -42
- package/skills/wix-app/references/BACKEND_EVENT.md +10 -65
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +101 -406
- package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +14 -111
- package/skills/wix-app/references/DASHBOARD_MODAL.md +56 -205
- package/skills/wix-app/references/DASHBOARD_PAGE.md +19 -98
- package/skills/wix-app/references/DASHBOARD_PLUGIN.md +6 -108
- package/skills/wix-app/references/DATA_COLLECTION.md +113 -198
- package/skills/wix-app/references/EMBEDDED_SCRIPT.md +41 -268
- package/skills/wix-app/references/EXTENSION_REGISTRATION.md +27 -76
- package/skills/wix-app/references/SERVICE_PLUGIN.md +35 -188
- package/skills/wix-app/references/SITE_PLUGIN.md +8 -92
- package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +0 -44
- package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +19 -330
- package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +0 -12
- package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +7 -0
- package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +0 -12
- package/skills/wix-app/references/dashboard-plugin/SLOTS.md +3 -15
- package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +2 -18
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +2 -42
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +1 -11
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +1 -11
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +2 -40
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +2 -19
- package/skills/wix-app/references/service-plugin/VALIDATIONS.md +2 -18
- package/skills/wix-app/references/site-plugin/SLOTS.md +17 -68
- package/skills/wix-design-system/SKILL.md +4 -0
- package/skills/wix-headless/SKILL.md +131 -386
- package/skills/wix-headless/references/BUILD-astro.md +246 -0
- package/skills/wix-headless/references/BUILD-own-build.md +167 -0
- package/skills/wix-headless/references/BUILD.md +105 -0
- package/skills/wix-headless/references/DESIGN_SYSTEM.md +175 -0
- package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
- package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
- package/skills/wix-headless/references/DISCOVERY.md +50 -306
- package/skills/wix-headless/references/PLAN-connect.md +19 -0
- package/skills/wix-headless/references/PLAN-create.md +17 -0
- package/skills/wix-headless/references/PLAN.md +92 -0
- package/skills/wix-headless/references/SEED.md +214 -0
- package/skills/wix-headless/references/SETUP.md +73 -248
- package/skills/wix-headless/references/{blog → astro/blog}/BLOG_PAGES.md +6 -5
- package/skills/wix-headless/references/{blog → astro/blog}/BLOG_SETUP.md +2 -2
- package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +337 -0
- package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +428 -0
- package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +214 -0
- package/skills/wix-headless/references/{cms → astro/cms}/FAQ_KNOWLEDGE_BASE.md +14 -12
- package/skills/wix-headless/references/{cms → astro/cms}/PORTFOLIO.md +15 -16
- package/skills/wix-headless/references/{cms → astro/cms}/RESOURCE_LIBRARY.md +13 -15
- package/skills/wix-headless/references/{cms → astro/cms}/TEAM_DIRECTORY.md +11 -11
- package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +354 -0
- package/skills/wix-headless/references/{ecom → astro/ecom}/CART_PAGES.md +8 -9
- package/skills/wix-headless/references/{ecom → astro/ecom}/CART_WIRING.md +6 -6
- package/skills/wix-headless/references/{ecom → astro/ecom}/COMPONENTS_CSS.md +6 -6
- package/skills/wix-headless/references/{forms → astro/forms}/CONTACT_FORM.md +18 -32
- package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/COMPONENTS.md +3 -3
- package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/PAGES.md +2 -2
- package/skills/wix-headless/references/{stores → astro/stores}/BACK_IN_STOCK.md +7 -7
- package/skills/wix-headless/references/{stores → astro/stores}/CATEGORY_PAGES.md +12 -13
- package/skills/wix-headless/references/{stores → astro/stores}/COMPONENTS_CSS.md +7 -7
- package/skills/wix-headless/references/{stores → astro/stores}/HOME_AND_NAV.md +11 -9
- package/skills/wix-headless/references/{stores → astro/stores}/PRODUCT_PAGES.md +11 -9
- package/skills/wix-headless/references/{stores → astro/stores}/SHARED_WIRING.md +8 -7
- package/skills/wix-headless/references/astro/templates/Footer.astro +27 -0
- package/skills/wix-headless/references/astro/templates/Layout.astro +132 -0
- package/skills/wix-headless/references/astro/templates/Navigation.astro +38 -0
- package/skills/wix-headless/references/astro/templates/astro.config.mjs +41 -0
- package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +218 -0
- package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +194 -0
- package/skills/wix-headless/references/astro/templates/bookings/ManageBooking.tsx +84 -0
- package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
- package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +50 -0
- package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
- package/skills/wix-headless/references/astro/templates/bookings/api/confirm-booking.ts +34 -0
- package/skills/wix-headless/references/astro/templates/bookings/api/waitlist.ts +74 -0
- package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +111 -0
- package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +413 -0
- package/skills/wix-headless/references/astro/templates/bookings/manage-booking.astro +76 -0
- package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +81 -0
- package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +65 -0
- package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +302 -0
- package/skills/wix-headless/references/astro/templates/global.css +286 -0
- package/skills/wix-headless/references/astro/templates/index.astro +56 -0
- package/skills/wix-headless/{templates → references/astro/templates}/stores/back-in-stock.ts +1 -1
- package/skills/wix-headless/{templates → references/astro/templates}/stores/components-stores.css +138 -33
- package/skills/wix-headless/references/blog/BLOG_CONTENT.md +28 -19
- package/skills/wix-headless/references/blog/INSTRUCTIONS.md +6 -6
- package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +106 -0
- package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
- package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +35 -232
- package/skills/wix-headless/references/cms/INSTRUCTIONS.md +39 -8
- package/skills/wix-headless/references/commands/known-apps.json +2 -1
- package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
- package/skills/wix-headless/references/custom/INSTRUCTIONS.md +88 -0
- package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
- package/skills/wix-headless/references/custom/bookings/WIRING.md +88 -0
- package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
- package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
- package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
- package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
- package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +12 -12
- package/skills/wix-headless/references/forms/INSTRUCTIONS.md +6 -6
- package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +13 -13
- package/skills/wix-headless/references/images/INSTRUCTIONS.md +58 -60
- package/skills/wix-headless/references/seed-recipes.md +49 -0
- package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
- package/skills/wix-headless/references/shared/AUTHENTICATION.md +108 -0
- package/skills/wix-headless/references/shared/BUILD_NOISE.md +2 -2
- package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
- package/skills/wix-headless/references/shared/DOCS_SEARCH.md +41 -0
- package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +40 -39
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +92 -41
- package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +3 -3
- package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +32 -312
- package/skills/wix-headless/references/shared/STYLING.md +48 -21
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +59 -29
- package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +31 -28
- package/skills/wix-headless/references/verticals/_schema.json +31 -117
- package/skills/wix-headless/references/verticals/_schema.md +60 -150
- package/skills/wix-headless/references/verticals/blog.md +5 -99
- package/skills/wix-headless/references/verticals/bookings.md +41 -0
- package/skills/wix-headless/references/verticals/cms.md +9 -100
- package/skills/wix-headless/references/verticals/ecom.md +6 -77
- package/skills/wix-headless/references/verticals/forms.md +5 -85
- package/skills/wix-headless/references/verticals/gift-cards.md +6 -103
- package/skills/wix-headless/references/verticals/stores.md +10 -144
- package/skills/wix-headless/scripts/check-manifest.mjs +148 -11
- package/skills/wix-headless/scripts/compose.mjs +540 -0
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +136 -53
- package/skills/wix-headless/scripts/flatten.sh +61 -0
- package/skills/wix-headless/scripts/generate-images.mjs +242 -0
- package/skills/wix-headless/scripts/patch-decorative-slots.mjs +67 -43
- package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +3 -3
- package/skills/wix-headless/scripts/scaffold.sh +113 -27
- package/skills/wix-headless/scripts/seed-utilities.sh +50 -12
- package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
- package/skills/wix-manage/SKILL.md +4 -8
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +2 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +4 -0
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +2 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +4 -0
- package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
- package/skills/wix-manage/references/ecommerce/api-shipping.md +443 -0
- package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +5 -6
- package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +4 -5
- package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +4 -5
- package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +1 -1
- package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +1 -2
- package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +2 -2
- package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +4 -5
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +7 -7
- package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +209 -72
- package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +9 -10
- package/skills/wix-manage/references/ecommerce/skill-graph.md +4 -4
- package/skills/wix-manage/references/forms/create-form.md +50 -0
- package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +2 -0
- package/skills/wix-manage/references/stores/create-product-from-image.md +91 -38
- package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +2 -0
- package/skills/wix-app/references/custom-element-widget/default-thumbnail.png +0 -0
- package/skills/wix-app/references/data-collection/extension-template.ts +0 -107
- package/skills/wix-headless/references/ORCHESTRATION.md +0 -269
- package/skills/wix-headless/references/commands/install-app.md +0 -42
- package/skills/wix-headless/references/commands/mcp-bootstrap.md +0 -28
- package/skills/wix-headless/references/designer/INSTRUCTIONS.md +0 -828
- package/skills/wix-headless/references/shared/MCP_PREFIX.md +0 -105
- package/skills/wix-headless/scripts/copy-utility-templates.mjs +0 -153
- package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
- package/skills/wix-headless/scripts/init-site-json.mjs +0 -63
- package/skills/wix-headless/scripts/preview.sh +0 -45
- package/skills/wix-headless/scripts/release.sh +0 -73
- package/skills/wix-headless/templates/ecom/components-ecom.css +0 -215
- package/skills/wix-manage/references/events/list-events.md +0 -203
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartBadge.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartView.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/cart.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/discounts.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/ecom/thank-you.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/GiftCardPurchase.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_home-teaser-snippet.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_nav-snippet.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/components-gift-cards.css +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/AddToCartButton.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/BackInStockForm.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/CategoryRail.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductCard.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductPurchase.tsx +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/SeoTags.astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/categories.ts +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/category/[slug].astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/[slug].astro +0 -0
- /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/index.astro +0 -0
|
@@ -1,304 +1,129 @@
|
|
|
1
1
|
# Setup
|
|
2
2
|
|
|
3
|
-
Runs once
|
|
3
|
+
Runs once after approval, with the contract in scratch. Domain: install the apps the loaded packs declare, pull the Wix env, run `npm install`, and read `siteId` + `appId` from `wix.config.json` into scratch. Run flow (timing, handles, waits, batching) is owned by the framework conductor (`BUILD-astro.md` / `BUILD-own-build.md`; Setup is an early run-step in each).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
This article covers **two entry paths**:
|
|
8
|
-
|
|
9
|
-
1. **New project flow** (the default — Sections "Step 0", "Setup Dispatch", "npm install recovery"). The orchestrator scaffolds a fresh Astro project via `scaffold.sh` in Discovery Step 1, then runs the dispatch below.
|
|
10
|
-
2. **Existing project flow** (see "Existing project flow" at the bottom). The user already has a working frontend (e.g. a Claude Design output, a hand-coded HTML/JSX site) and wants to **connect it** to Wix Headless to get hosting + Business Solutions. No scaffold, no Astro, no design/seed/pages waves — just connect, install needed apps, optionally wire SDK calls, release.
|
|
11
|
-
|
|
12
|
-
Both paths share **Step 0 (MCP bootstrap)**. Branch immediately after.
|
|
13
|
-
|
|
14
|
-
> **Routing decision (do this BEFORE Step 0's dispatch).** Inspect the working directory:
|
|
15
|
-
> - **Empty / non-existent / freshly-scaffolded** AND Discovery Step 1's `scaffold.sh` is what populated it → **New project flow** (continue with this article top-to-bottom).
|
|
16
|
-
> - **Already contains source files** (`index.html`, `*.jsx`, `*.tsx`, `*.vue`, `package.json` from a non-Wix template, etc.) AND no scaffold was dispatched in Discovery → **Existing project flow** (jump to "Existing project flow" at the bottom; skip the Setup Dispatch).
|
|
17
|
-
> - **Contains `wix.config.json`** AND an Astro project structure (`src/`, `astro.config.mjs`) → resume a prior wix-headless run (see `SKILL.md` § "When NOT to Use This Skill" — ask the user "continue or start fresh?").
|
|
18
|
-
> - **Contains `wix.config.json`** AND a non-Astro frontend (`index.html` at root, `*.jsx` files) → already-`init`'d existing project; jump to "Existing project flow" § "After init" (skip the init step itself).
|
|
5
|
+
This article is the **astro entry path** (`frontendBuild === "wix"`): Steps 1–5 + npm recovery. The `none`/`own` classes reuse **only** Step 4a (app installs); their skips (no `env pull`, no `scaffold.sh`, no per-pack `npm install`, no `seed-utilities.sh`) and their `init` bootstrap are owned by `BUILD-own-build.md`. Assumes `DISCOVERY.md`'s CLI-auth pre-flight passed. Routing: `PLAN.md` § "Operation routing" + `BUILD.md`.
|
|
19
6
|
|
|
20
7
|
---
|
|
21
8
|
|
|
22
|
-
## Step
|
|
9
|
+
## Step 1 — Read the scaffolded project config (siteId + appId)
|
|
23
10
|
|
|
24
|
-
|
|
11
|
+
> **Single folder — CWD == project == site-root.** `scaffold.sh` flattens the project into CWD: one folder, one `.wix/` (`package.json`, `src/`, `wix.config.json`, `.wix/design-tokens.css`, …), with the end-of-run `AGENTS.md` at its root. Never `cd` into a subdir or look in a parent for `.wix`. `<site-root>` == `<project-dir>` == CWD; pass absolute paths only when a call runs in its own subshell.
|
|
25
12
|
|
|
26
|
-
|
|
27
|
-
2. Call `<prefix>WixREADME` once to verify connectivity.
|
|
28
|
-
3. If discovery returns no match or the verify call fails → stop and tell the user: *"Wix MCP tools are not available in this session. Please ensure the Wix MCP server is connected (or that the Wix plugin is enabled), then restart your client."*
|
|
29
|
-
4. **Pre-load Wix MCP tool schemas** — read `<SKILL_ROOT>/references/commands/mcp-bootstrap.md` and follow its single `ToolSearch` invocation. Loads every Wix MCP tool schema the build will use (CallWixSiteAPI, SearchWixRESTDocumentation, ReadFullDocsArticle, ReadFullDocsMethodSchema, SearchWixCLIDocumentation, SearchWixSDKDocumentation, SearchWixHeadlessDocumentation, SearchWixWDSDocumentation, SearchBuildAppsDocumentation, BrowseWixRESTDocsMenu).
|
|
30
|
-
5. Hold the prefix for the whole session. Pass it into **every** subagent prompt as:
|
|
31
|
-
```
|
|
32
|
-
MCP tool prefix: <prefix>
|
|
33
|
-
Use this prefix for every Wix MCP call. Example: <prefix>CallWixSiteAPI, <prefix>WixREADME.
|
|
34
|
-
```
|
|
13
|
+
Do **not** speculatively `Read ./wix.config.json` before the scaffold completes — it doesn't exist yet on a fast-Q&A run, so the read fails and wastes a round-trip.
|
|
35
14
|
|
|
36
|
-
|
|
15
|
+
Once `scaffold_handle` returns, read `./wix.config.json` and hold in scratch:
|
|
16
|
+
- `siteId` — passed as `--site` to `npx @wix/cli@latest token`, embedded in every install body + the `wix-site-id` header on every site-scoped REST call.
|
|
17
|
+
- `appId` — goes into the SDK's `createClient` inputs later.
|
|
37
18
|
|
|
38
|
-
|
|
19
|
+
Capture CWD as `<site-root>` in scratch. No `cd` step — every file op runs in the project root.
|
|
39
20
|
|
|
40
21
|
---
|
|
41
22
|
|
|
42
|
-
##
|
|
43
|
-
|
|
44
|
-
> **BATCHING — read this twice before proceeding.**
|
|
45
|
-
>
|
|
46
|
-
> Launch every operation below as a single concurrent batch. No narration, no *"Now setting up:"*, no transition text between dispatches.
|
|
47
|
-
>
|
|
48
|
-
> Any text adjacent to a dispatch closes the batch and forces remaining operations into separate turns. An earlier run lost 13s to roadmap-tracker calls splitting across 13 turns; an earlier run lost ~50 minutes to an npm install recovery gate. Both are eliminated by strict single-batch dispatch here.
|
|
49
|
-
|
|
50
|
-
### Contents of the setup dispatch
|
|
51
|
-
|
|
52
|
-
The skill assembles this dispatch dynamically from the loaded vertical packs. The items below list what to emit.
|
|
53
|
-
|
|
54
|
-
#### 1. Verify scaffold completed
|
|
55
|
-
|
|
56
|
-
**Before the setup dispatch:** read `<project>/wix.config.json` to confirm the background scaffold from Discovery Step 1 finished. If not, wait for the background scaffold to finish. On scaffold failure, retry the inline `npm create @wix/new` call once (same shell command from DISCOVERY.md Step 1); surface the error if it still fails. Recovery ladder is documented in DISCOVERY.md § "Strict-then-recover" — auth, invalid template, etc.
|
|
23
|
+
## Step 3 — Invoke the `wix-manage` skill
|
|
57
24
|
|
|
58
|
-
|
|
25
|
+
**Always invoke `Skill(name="wix-manage")` here** — it is the only thing that publishes `<wix-manage-root>` into scratch **and loads the recipe files into context** (Step 4's installs and the whole Seed phase reuse them; `SEED.md` does not re-invoke). A known directory path is not a substitute — the recipes must be in context. Use the harness's skill-invocation primitive (Claude Code: `Skill(name="wix-manage")`); the prose instruction is the contract — don't hardcode a tool-call snippet.
|
|
59
26
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
#### 2. The dispatch itself (one concurrent batch)
|
|
63
|
-
|
|
64
|
-
**MCP app installs** — one `<prefix>CallWixSiteAPI` per app in the union of loaded packs' `apps[*]`. Example for an ecommerce run (stores pack contributes one app; cms pack contributes none):
|
|
27
|
+
Then read the app-install recipe by absolute path (the `Skill` invocation must precede this Read — it needs the path `wix-manage`'s SKILL.md publishes):
|
|
65
28
|
|
|
66
29
|
```
|
|
67
|
-
<
|
|
68
|
-
siteId: "<siteId>",
|
|
69
|
-
reason: "Install Wix Stores app for <brand>",
|
|
70
|
-
sourceDocUrl: "https://dev.wix.com/docs/picasso/wix-ai-docs/recipes-v2/manage/platform/recipe-install-wix-apps",
|
|
71
|
-
method: "POST",
|
|
72
|
-
url: "https://www.wixapis.com/apps-installer-service/v1/app-instance/install",
|
|
73
|
-
body: {
|
|
74
|
-
tenant: { tenantType: "SITE", id: "<siteId>" },
|
|
75
|
-
appInstance: { appDefId: "<pack.apps[0].appDefId>", enabled: true }
|
|
76
|
-
}
|
|
77
|
-
)
|
|
30
|
+
Read <wix-manage-root>/references/app-installation/install-wix-apps.md
|
|
78
31
|
```
|
|
79
32
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
A 200 response with `"enabled": true` confirms success.
|
|
83
|
-
|
|
84
|
-
**Packs with `apps: []` (e.g. `cms`)** — record a phase entry in `run.json` anyway: `{phase: "app-install-<pack>", status: "skipped", notes: "Bundled with Wix platform; no install required"}`. Without an explicit skipped entry, `run.json` reads as a silent omission ("did the CMS install run? was it skipped? did it fail?"); the explicit entry makes observability unambiguous.
|
|
85
|
-
|
|
86
|
-
**Namespace propagation:** After app install, the app's API namespace may take up to 30 seconds to register. If a downstream MCP call fails with `UNSUPPORTED_FORM_NAMESPACE`, wait 10 seconds and retry up to 3 times. Phase 1 Seeders handle this retry themselves.
|
|
87
|
-
|
|
88
|
-
**Shell: `npx @wix/cli env pull`** (foreground, ~5s). Writes `WIX_CLIENT_ID` to `.env.local`. Idempotent. Skipping this historically caused `Missing environment variable WIX_CLIENT_ID` build failures.
|
|
89
|
-
|
|
90
|
-
**Background shell: `npm install ...`**:
|
|
91
|
-
|
|
92
|
-
The package list is the union of:
|
|
93
|
-
- Always: `@wix/sdk tailwindcss @tailwindcss/vite`
|
|
94
|
-
- Per loaded pack: each pack's `packages` array
|
|
95
|
-
|
|
96
|
-
> **Do not add any package beyond this set.** If a pack feels like it should have its own SDK (`@wix/<pack-name>`), confirm by reading its `packages:` array. Passive packs (gift-cards) intentionally declare nothing because they're runtime-detected via REST. There is no `@wix/gift-cards` SDK on npm — adding it on a hunch fails with `npm 404`. Same logic for any other pack: the union above is the install list. Period.
|
|
33
|
+
The recipe's Step 2 documents the install body shape:
|
|
97
34
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
Example combined command (ecommerce run):
|
|
103
|
-
```bash
|
|
104
|
-
rm -f package-lock.json && npm install --no-fund --no-audit --legacy-peer-deps \
|
|
105
|
-
@wix/sdk tailwindcss @tailwindcss/vite \
|
|
106
|
-
@wix/stores @wix/ecom @wix/redirects @wix/site \
|
|
107
|
-
@wix/data @wix/essentials
|
|
35
|
+
```
|
|
36
|
+
tenant: { tenantType: "SITE", id: "<siteId>" }
|
|
37
|
+
appInstance: { appDefId: "<pack.apps[N].appDefId>" }
|
|
108
38
|
```
|
|
109
39
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
**Memory writes** — two writes:
|
|
113
|
-
1. `MEMORY.md` index entry (one line)
|
|
114
|
-
2. `project`-type memory file with brand, vertical(s), apps, pages, project path, phase: `scaffolding`
|
|
115
|
-
|
|
116
|
-
**User-facing roadmap × N** — target 6–8 entries mapped to phase boundaries:
|
|
117
|
-
|
|
118
|
-
| Entry | Marks completed |
|
|
119
|
-
|------|-----------------|
|
|
120
|
-
| Scaffold project | Immediately on creation (already done in Discovery) |
|
|
121
|
-
| Install apps | Immediately on creation (this dispatch) |
|
|
122
|
-
| Seed data | After Phase 1 Seed returns (Step 6) |
|
|
123
|
-
| Design site | After Phase 2 Design System returns (Step 4) |
|
|
124
|
-
| Generate images | After image subagent returns (may finish later than critical path) |
|
|
125
|
-
| Wire features | After Phase 3 Components + Phase 4 Pages return (Step 7/8) |
|
|
126
|
-
| Install dependencies | After npm install background shell completes (Step 8) |
|
|
127
|
-
| Build and preview | After Step 8 |
|
|
128
|
-
|
|
129
|
-
> **No ampersands in roadmap titles.** Some progress trackers HTML-escape input — `"Build & preview"` renders as literal `Build & preview`. Spell out "and" (or restructure) to avoid `&`. Same for `<`, `>`, `"` and other HTML-meaningful characters.
|
|
130
|
-
|
|
131
|
-
> **Avoid the 13-entry sprawl.** Historical runs used one entry per phase-per-feature ("Design page — Home", "Seed stores", "Wire CMS", etc.). Collapse to the phase-boundary list above. Users care about milestones, not sub-phases.
|
|
132
|
-
|
|
133
|
-
**Shell: `mkdir -p .wix`** — minimal. No `.wix/logs/`.
|
|
134
|
-
|
|
135
|
-
### Batching verification
|
|
136
|
-
|
|
137
|
-
After the dispatch, the run log should show ~8–12 operations dispatched as one concurrent batch (varies by pack count). If they spread across multiple turns, the batching guidance failed and the skill needs to be tightened.
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## npm install recovery
|
|
142
|
-
|
|
143
|
-
If the background npm install from the Setup dispatch fails or hangs:
|
|
144
|
-
|
|
145
|
-
1. **Foreground retry with 90-second timeout:**
|
|
146
|
-
```bash
|
|
147
|
-
npm install --no-fund --no-audit --legacy-peer-deps <packages>
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
2. **If still hanging, retry with `--prefer-offline`:**
|
|
151
|
-
```bash
|
|
152
|
-
npm install --prefer-offline --no-fund --no-audit --legacy-peer-deps <packages>
|
|
153
|
-
```
|
|
40
|
+
Endpoint: `POST https://www.wixapis.com/apps-installer-service/v1/app-instance/install`.
|
|
154
41
|
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
npm cache clean --force
|
|
158
|
-
npm install --no-fund --no-audit --legacy-peer-deps <packages>
|
|
159
|
-
```
|
|
42
|
+
> **Recipe call shape.** Recipes are authored in `curl` form. Build each call with the headers in `references/shared/AUTHENTICATION.md` (`Authorization: Bearer $TOKEN` + `wix-site-id: $SITE_ID` + `Content-Type: application/json`). The recipe's URL/method/body are the source of truth.
|
|
160
43
|
|
|
161
|
-
|
|
44
|
+
> **Missing-skill fallback (only if the `Skill` primitive errors):** fall back to the install body shape above (REST-shaped and stable) and note the missing skill in the run digest. Don't silently substitute — `wix-manage` is the canonical entry point.
|
|
162
45
|
|
|
163
46
|
---
|
|
164
47
|
|
|
165
|
-
##
|
|
166
|
-
|
|
167
|
-
Proceed immediately to **Step 3 — Phase 1 Seed + Phase 2 Design System + Image Phase 1** — see `ORCHESTRATION.md`. Do not wait for the background npm install; that's waited on in Step 8.
|
|
168
|
-
|
|
169
|
-
---
|
|
48
|
+
## Step 4 — One concurrent batch
|
|
170
49
|
|
|
171
|
-
|
|
50
|
+
Fire 4a + 4b + 4c as a single concurrent batch (`PLAN.md` § "Batching discipline").
|
|
172
51
|
|
|
173
|
-
|
|
52
|
+
### 4a. App installs — one `curl` per `pack.apps[*]` (business track, frontend-blind)
|
|
174
53
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
| Aspect | New project | Existing project |
|
|
178
|
-
|---|---|---|
|
|
179
|
-
| Project creation | `npm create @wix/new@latest headless` (via `scaffold.sh`) — fresh Astro blank template | `npm create @wix/new@latest init` — wraps the existing project, leaves source untouched |
|
|
180
|
-
| Frontend | Generated by Phases 2–5 (Astro + designer + components + pages) | Already exists; orchestrator does **not** generate UI |
|
|
181
|
-
| Seeders / Designer / Pages waves | Run | **Skipped** — there is no Astro structure to populate |
|
|
182
|
-
| App installs | From inferred vertical packs | From a quick **project analysis** (see below) — only apps the existing project actually needs |
|
|
183
|
-
| SDK wiring into source | N/A (designer/pages waves write Astro + SDK calls from scratch) | **Required** — edit the project's existing source files in place to wire each installed app's SDK calls to its corresponding feature surface |
|
|
184
|
-
| Build / release | `npx @wix/cli build` + `release` via `release.sh` | `npx @wix/cli release` directly — **no build step**; the existing `index.html` is published as-is |
|
|
185
|
-
| Entry file | `src/pages/index.astro` (Astro convention) | **Must be `index.html`** at the configured `outputDirectory` |
|
|
186
|
-
|
|
187
|
-
### Step E1 — Init (replaces scaffold)
|
|
188
|
-
|
|
189
|
-
`cd` into the existing project directory. Run, foreground (it's interactive-ish but non-blocking with `--yes`-style defaults; capture stdout):
|
|
54
|
+
The install body is identical per `pack.apps[*]` regardless of frontend. Mint the site-scoped REST token once, cache it for the run, then fire one `curl` per `apps:` entry across every loaded pack (top-level + transitive via `requires:`):
|
|
190
55
|
|
|
191
56
|
```bash
|
|
192
|
-
|
|
57
|
+
SITE_ID="<siteId>"
|
|
58
|
+
TOKEN=$(npx @wix/cli@latest token --site "$SITE_ID") # once; cache in scratch for the run
|
|
59
|
+
|
|
60
|
+
# per-pack iteration; one curl per pack.apps[*]:
|
|
61
|
+
curl -sS -X POST "https://www.wixapis.com/apps-installer-service/v1/app-instance/install" \
|
|
62
|
+
-H "Authorization: Bearer $TOKEN" \
|
|
63
|
+
-H "wix-site-id: $SITE_ID" \
|
|
64
|
+
-H "Content-Type: application/json" \
|
|
65
|
+
-d '{
|
|
66
|
+
"tenant": { "tenantType": "SITE", "id": "'"$SITE_ID"'" },
|
|
67
|
+
"appInstance": { "appDefId": "<pack.apps[N].appDefId>", "enabled": true }
|
|
68
|
+
}'
|
|
193
69
|
```
|
|
194
70
|
|
|
195
|
-
|
|
71
|
+
Use `npx @wix/cli@latest token …` (not bare `wix token`) — `npx` resolves the project-local CLI the scaffold produced (first call auto-fetches it ~3–5 s if missing). A 200 confirms the install. On 401/403, retry the same call once with the cached token (do **not** re-mint — it's byte-identical for the run; recovery ladder in `references/shared/AUTHENTICATION.md`); a persistent 401 usually means the CLI session expired and `wix login` is required — surface the response body.
|
|
196
72
|
|
|
197
|
-
|
|
73
|
+
Packs with `apps: []` (`cms`, `ecom`) or `disabled: true` (`gift-cards`, whose `apps:` is empty by design — the user opts in via the dashboard) install nothing — skip the curl.
|
|
198
74
|
|
|
199
|
-
|
|
200
|
-
{
|
|
201
|
-
"projectType": "Site",
|
|
202
|
-
"appId": "16511cb9-3d3a-4371-a04a-bcc176ae5d50", // SDK clientId
|
|
203
|
-
"siteId": "90b8c952-a7f9-4d79-a2c0-b0ec3e1c1434", // businessId for all MCP calls
|
|
204
|
-
"site": {
|
|
205
|
-
"outputDirectory": "./site" // edit to "./" if the entry file is at project root
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
```
|
|
75
|
+
### 4b. `npx @wix/cli@latest env pull --json`
|
|
209
76
|
|
|
210
|
-
**
|
|
77
|
+
Foreground, ~5 s. Writes `WIX_CLIENT_ID` to `.env.local` (idempotent). Skipping it causes `Missing environment variable WIX_CLIENT_ID` build failures downstream. **Always pass `--json`** — without it the CLI emits an interactive spinner that floods the non-TTY pipe with ANSI frames; `--json` gives one clean line (the skill only needs `.env.local` on disk).
|
|
211
78
|
|
|
212
|
-
|
|
213
|
-
2. **`site.outputDirectory` must point at the directory containing `index.html`.** If `index.html` is at the project root, edit `wix.config.json` and set `"outputDirectory": "./"`. Default is `"./site"` which assumes a build output directory.
|
|
214
|
-
3. Extract `siteId` from `wix.config.json` — same role as in the new-project flow (businessId for every MCP call this session).
|
|
215
|
-
4. Capture timing as `{ phase: "init", seconds: <duration>, started, ended }` in `run.json.phases[]`.
|
|
79
|
+
### 4c. Dispatch background `npm install`
|
|
216
80
|
|
|
217
|
-
|
|
218
|
-
- Auth error → surface `"Run \`npx @wix/cli login\` and retry."` and stop (same as new-project flow).
|
|
219
|
-
- `init` already ran here (a `wix.config.json` already exists) → skip Step E1, continue to E2.
|
|
220
|
-
- Network / unknown → surface stderr to the user.
|
|
81
|
+
Background shell; capture `npm_handle` + `<npm-tempfile>` in scratch. Trust the exit code at the seed gate — do not probe `node_modules`.
|
|
221
82
|
|
|
222
|
-
|
|
83
|
+
```bash
|
|
84
|
+
npm install --no-fund --no-audit --legacy-peer-deps <package-set> \
|
|
85
|
+
2> <npm-tempfile>
|
|
86
|
+
# dispatched with run_in_background: true; capture as npm_handle
|
|
87
|
+
```
|
|
223
88
|
|
|
224
|
-
|
|
89
|
+
`<package-set>` from the resolved pack set (loaded + transitive via `requires:`):
|
|
225
90
|
|
|
226
|
-
|
|
|
91
|
+
| Always | Add when pack is loaded |
|
|
227
92
|
|---|---|
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
232
|
-
|
|
|
233
|
-
|
|
|
234
|
-
|
|
|
235
|
-
|
|
236
|
-
Read `index.html` and any top-level source files (`*.jsx`, `*.tsx`, `*.html`, `*.js`) to look for these signals. Cap reading at the top 5 source files by size — don't grovel.
|
|
237
|
-
|
|
238
|
-
> If unsure between two packs, ask the user with `AskUserQuestion`. Don't install everything "just in case" — every app install adds clutter to the user's dashboard.
|
|
239
|
-
|
|
240
|
-
### Step E3 — Install apps (reuse new-project flow's install mechanism)
|
|
241
|
-
|
|
242
|
-
For each pack identified in E2, follow `<SKILL_ROOT>/references/commands/install-app.md` — the `CallWixSiteAPI` body, `appName → appDefId` lookup, and recovery ladder are identical to the new-project flow. Capture `{ phase: "app-install-<appName>", seconds }` per install.
|
|
243
|
-
|
|
244
|
-
Skip the new-project flow's other Wave-2 operations: **no `env pull` is required** for a pure-static site (only needed if the project will call Wix SDK from server-side / build-time code), **no `npm install`** (the existing project manages its own deps), **no `seed-utilities.sh`** (no Astro `src/utils/` to seed), **no `init-site-json.mjs`** (no `.wix/site.json` lifecycle).
|
|
245
|
-
|
|
246
|
-
> If the user wants to wire Wix SDK calls into the existing project (e.g. submit an RSVP form to a Wix CMS collection), then `env pull` + adding `@wix/sdk` + the relevant `@wix/<pack>` packages to the project's own `package.json` IS needed. Treat that as a follow-up sub-task per-pack and let the user confirm before modifying their `package.json`.
|
|
247
|
-
|
|
248
|
-
### Step E4 — SDK wiring
|
|
93
|
+
| `@wix/sdk tailwindcss @tailwindcss/vite` | — |
|
|
94
|
+
| | **stores** → `@wix/stores` |
|
|
95
|
+
| | **ecom** (direct or via stores `requires:`) → `@wix/ecom @wix/redirects` |
|
|
96
|
+
| | **blog** → `@wix/blog @wix/ricos @astrojs/rss @astrojs/sitemap` |
|
|
97
|
+
| | **forms** → `@wix/forms` |
|
|
98
|
+
| | **cms** → `@wix/data @wix/essentials` |
|
|
99
|
+
| | **bookings** → `@wix/bookings @wix/essentials` |
|
|
100
|
+
| | **gift-cards** → (none — disabled-by-default pack ships no Astro-time imports) |
|
|
249
101
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
1. Add `@wix/sdk` + the pack's `packages:` (from `references/verticals/<pack>.md`) to the project's `package.json` (`npm init -y` first if absent), then run the project's install command. `--no-fund --no-audit --legacy-peer-deps`.
|
|
253
|
-
2. Edit the source files in place. Follow call patterns from `<SKILL_ROOT>/references/<pack>/INSTRUCTIONS.md` (translate Astro idioms → the project's framework; SDK calls themselves are framework-agnostic). Initialize the client once per file:
|
|
254
|
-
|
|
255
|
-
```js
|
|
256
|
-
import { createClient, OAuthStrategy } from "@wix/sdk";
|
|
257
|
-
const wix = createClient({
|
|
258
|
-
modules: { /* pack modules */ },
|
|
259
|
-
auth: OAuthStrategy({ clientId: "<appId from wix.config.json>" }),
|
|
260
|
-
});
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
**Always inline the `appId` literal from `wix.config.json`.** No env vars, no `import.meta.env`, no `window.__WIX_CLIENT_ID__` — read `wix.config.json` once and paste the appId string into every `createClient` call. Keeps the static-site case working with no build step.
|
|
264
|
-
|
|
265
|
-
Capture `{ phase: "sdk-wiring-<pack>", seconds }` per pack.
|
|
266
|
-
|
|
267
|
-
### Step E5 — Release (no build)
|
|
268
|
-
|
|
269
|
-
**Do NOT run `release.sh`** in this flow — `release.sh` runs `npx @wix/cli build` first, and there is nothing to build. The existing project's `index.html` and its sibling assets already sit at the configured `site.outputDirectory`; Wix just needs to publish that directory as-is. Calling `build` here either no-ops (wastes ~5–15 s) or fails if the project has no Astro/Vite config the Wix CLI knows how to invoke.
|
|
270
|
-
|
|
271
|
-
Run release directly:
|
|
102
|
+
Example (resolved set = stores + ecom + gift-cards + cms):
|
|
272
103
|
|
|
273
104
|
```bash
|
|
274
|
-
|
|
105
|
+
npm install --no-fund --no-audit --legacy-peer-deps \
|
|
106
|
+
@wix/sdk @wix/stores @wix/ecom @wix/redirects \
|
|
107
|
+
@wix/data @wix/essentials \
|
|
108
|
+
tailwindcss @tailwindcss/vite \
|
|
109
|
+
2> <npm-tempfile>
|
|
275
110
|
```
|
|
276
111
|
|
|
277
|
-
|
|
112
|
+
Use `npm --legacy-peer-deps` — `pnpm` fails against the `@wix/cli` template. **Skipping the per-pack additions makes `astro build` fail with `Rollup failed to resolve import "@wix/<pack>"`** (~30 s recovery). Don't invent packages beyond the table; extend the table for a new vertical.
|
|
278
113
|
|
|
279
|
-
|
|
280
|
-
sed -nE 's/.*Site published on ([^[:space:]]+).*/\1/p'
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
Capture `{ phase: "release", seconds }` around the call. No `{ phase: "build" }` entry in `run.json` for this flow.
|
|
284
|
-
|
|
285
|
-
Auth-failure recovery: same as `release.sh` — if stderr mentions login, surface `"Run \`npx @wix/cli login\` and retry."` and stop. Transient errors (`ECONNRESET`, `temporarily unavailable`, etc.) — retry up to 3 times with `attempt * 5` second backoff, mirroring `release.sh`.
|
|
286
|
-
|
|
287
|
-
> **If the project needs a client build** (Vite, React, Webpack, etc.), run the project's own build command manually (e.g. `npm run build`) before `npx @wix/cli release`, and make sure `site.outputDirectory` points at the build output. Do not use `wix build`.
|
|
288
|
-
|
|
289
|
-
### Step E6 — Final message
|
|
114
|
+
---
|
|
290
115
|
|
|
291
|
-
|
|
116
|
+
## Step 5 — Transition to Seed
|
|
292
117
|
|
|
293
|
-
|
|
294
|
-
2. **Dashboard URL** — `https://manage.wix.com/dashboard/<siteId>` where `<siteId>` is the value from `wix.config.json`.
|
|
118
|
+
Setup prints no summary. Before transitioning to `SEED.md`, confirm: `siteId` + `appId` in scratch (from `wix.config.json`, both non-empty), the cached token mints, every `apps:` pack got a 200 (empty-`apps:` packs skipped), `.env.local` contains `WIX_CLIENT_ID`, and `npm_handle` was dispatched. On any failure, surface it verbatim instead of proceeding.
|
|
295
119
|
|
|
296
|
-
|
|
120
|
+
---
|
|
297
121
|
|
|
298
|
-
|
|
122
|
+
## npm install recovery
|
|
299
123
|
|
|
300
|
-
`
|
|
124
|
+
Invoked when `npm_handle` returns non-zero (dispatched in Step 4c, waited at the seed gate in `BUILD-astro.md`):
|
|
301
125
|
|
|
302
|
-
|
|
126
|
+
1. **Foreground retry** `npm install --no-fund --no-audit --legacy-peer-deps <packages>` (90 s timeout). If it hangs, add `--prefer-offline`; if still hanging, `npm cache clean --force` and retry once more.
|
|
127
|
+
2. **Last resort:** ask the user to run `npm install --legacy-peer-deps` manually and report back. Don't substitute pnpm/yarn — pnpm fails against the `@wix/cli` template.
|
|
303
128
|
|
|
304
|
-
|
|
129
|
+
Package set = the Step 4c table (always-on three ∪ per-pack packages). Don't invent package names.
|
|
@@ -114,8 +114,8 @@ const { title, description, pubDate, updatedDate, heroImage, tags = [] } = Astro
|
|
|
114
114
|
<head>
|
|
115
115
|
<BaseHead title={title} description={description ?? ''} />
|
|
116
116
|
<style is:global>
|
|
117
|
-
/* All BlogPost layout styles are created by the
|
|
118
|
-
See
|
|
117
|
+
/* All BlogPost layout styles are created by the merged pages scope.
|
|
118
|
+
See references/shared/STYLING.md (Blog Post Content) for the complete
|
|
119
119
|
styling contract: .hero-image, .prose, .title, .date, .tags,
|
|
120
120
|
.ricos-content overrides, etc. */
|
|
121
121
|
</style>
|
|
@@ -182,8 +182,8 @@ const posts = await queryBlogPosts();
|
|
|
182
182
|
<head>
|
|
183
183
|
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
|
184
184
|
<style>
|
|
185
|
-
/*
|
|
186
|
-
|
|
185
|
+
/* The merged blog-pages scope writes this route once — applying the
|
|
186
|
+
listing styles and binding queryBlogPosts() data in the same pass. */
|
|
187
187
|
</style>
|
|
188
188
|
</head>
|
|
189
189
|
<body>
|
|
@@ -267,6 +267,7 @@ Critical details:
|
|
|
267
267
|
- **`client:only="react"` is required** — `@wix/ricos` is a React component; `client:only="react"` ensures it renders only on the client, avoiding SSR issues with React-dependent code.
|
|
268
268
|
- **`[...slug]` (rest param)** — uses Astro's rest parameter syntax, not `[slug]`, to match the full slug path.
|
|
269
269
|
- **`RicosViewer`** renders the rich content from the Wix Blog editor (images, videos, text formatting, embeds, etc.) using `quickStartViewerPlugins()` for full content-type support.
|
|
270
|
+
- **Blog deliberately uses the React `RicosViewer`** (full feature set: galleries, polls, embedded media) — not a contradiction with CMS, which uses the lighter SSR `renderRicos` walker (`src/utils/ricos.ts`). Blog posts can carry the full Ricos feature set, so they need the React island; static CMS pages (about/faq/portfolio/team/resource) only need paragraphs + lists and avoid shipping ~80kb of React. See `references/astro/cms/CMS_FOUNDATIONS.md` § "Why not @wix/ricos?".
|
|
270
271
|
- **No `getStaticPaths()`** — Wix headless projects use `output: "server"` (SSR on Cloudflare Workers), so pages use `Astro.params` directly instead of static path generation.
|
|
271
272
|
- **404 handling** — `getPostBySlug` returns `null` for missing posts; redirect to `/blog` listing.
|
|
272
273
|
- **Ricos color overrides** — The BlogPost layout's `<style is:global>` block includes `.ricos-content` overrides that force `var(--color-text)` on all Ricos elements. Without these, blog text is invisible on dark themes.
|
|
@@ -296,4 +297,4 @@ export async function GET(context) {
|
|
|
296
297
|
}
|
|
297
298
|
```
|
|
298
299
|
|
|
299
|
-
> Requires the `site` property in `astro.config.mjs` (set in BLOG_SETUP.md step 1).
|
|
300
|
+
> Requires the `site` property in `astro.config.mjs` (set in BLOG_SETUP.md step 1).
|
|
@@ -5,7 +5,7 @@ Prerequisites, dependencies, blog service module, and astro config changes for t
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
7
|
- A Wix Managed Headless project (has `wix.config.json` and `astro.config.mjs`)
|
|
8
|
-
- The **Wix Blog app** installed on the connected Wix site (via
|
|
8
|
+
- The **Wix Blog app** installed on the connected Wix site (installed via the apps-installer REST endpoint after scaffolding — see `../../blog/BLOG_CONTENT.md` Step 0)
|
|
9
9
|
- At least one published blog post in the Wix dashboard
|
|
10
10
|
|
|
11
11
|
## Package Installation
|
|
@@ -215,4 +215,4 @@ Key details:
|
|
|
215
215
|
- `media.getImageUrl(ref).url` resolves Wix media references to real URLs
|
|
216
216
|
- `getPostBySlug` returns `null` for missing posts — pages must handle this with a redirect
|
|
217
217
|
- `queryBlogPosts()` sorts by `firstPublishedDate` descending (newest first)
|
|
218
|
-
- `RICH_CONTENT` fieldset is required to get renderable content for `RicosViewer`
|
|
218
|
+
- `RICH_CONTENT` fieldset is required to get renderable content for `RicosViewer`
|