diff --git a/.github/contributing/documentation.md b/.github/contributing/documentation.md index 786852f5b..8ff2a7be0 100644 --- a/.github/contributing/documentation.md +++ b/.github/contributing/documentation.md @@ -6,6 +6,33 @@ Component documentation uses MDC (Markdown Components) syntax. Docs live in `docs/content/docs/2.components/` with kebab-case naming (e.g., `button.md`). +## Checking a page renders + +MDC fails at render time, not at lint time, so a malformed block is invisible +until something builds the site. After `pnpm dev:prepare`: + +```bash +NUXT_PUBLIC_USE_AI=false \ +NUXT_PUBLIC_SITE_URL=https://bitrix24.github.io \ +NUXT_PUBLIC_BASE_URL=/b24ui \ +NUXT_PUBLIC_CANONICAL_URL=https://bitrix24.github.io \ +NUXT_PUBLIC_GIT_URL=https://github.com/bitrix24/b24ui \ +pnpm docs:generate +``` + +A successful run ends with `Prerendered N routes`; find your page in the list. + +The environment is not optional and its absence does not say so. Without those +variables the build dies during prerender with `ERROR completable is not +defined` — a `@nuxtjs/mcp-toolkit` symbol, nothing to do with your page, and +the same failure appears on a clean `main`. `deploy.yml` sets them at the job +level, which is why CI is green while a bare `pnpm docs:build` is not. + +CI runs `pnpm docs:full:generate`, which is `pnpm build && pnpm docs:generate`. +The extra build is there because the deploy publishes the package too; +`docs/nuxt.config.ts` registers the module from `../src/module`, so the docs +themselves render from source. + ## Basic Structure ```md diff --git a/docs/content/docs/2.components/form-field.md b/docs/content/docs/2.components/form-field.md index b867ee9b6..07a7f67f4 100644 --- a/docs/content/docs/2.components/form-field.md +++ b/docs/content/docs/2.components/form-field.md @@ -118,15 +118,15 @@ translation: ``` -`hint` and `description` take a slot the same way. The `required` asterisk is -drawn on the `