fix: docs build failure and add local example validation#50
Merged
Conversation
The docs build was failing because the signal/wait example blocks forever (nothing sends :my-channel in a standalone run), timing out the Janet example validator. Mark it `# ignore` like other blocking examples; the non-blocking signal/send example stays validated. Also fix a dynamic-property arity mismatch in layouts.md: the :title property now passes (size, layout), so border-title takes [size layout] (border-fg is preset with only the layout, so it stays [layout]). This clears the "function takes at most 1 args, got 2" log lines. Add a `just docs-validate` recipe that runs CI's exact example check locally. It clears both docs/.docusaurus and docs/node_modules/.cache so the markdown preprocessor actually re-runs -- a stale webpack cache otherwise reuses processed output and silently skips validation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the docs build CI failure and adds a local command to run CI's Janet example validation.
pkg/cy/api/docs-signal.md— thesignal/waitexample blocks forever (nothing sends:my-channelin a standalone run), which timed out the example validator and failed the build. Marked# ignorelike other blocking examples. The non-blockingsignal/sendexample stays validated.docs/docs/layouts.md— fixed a dynamic-property arity mismatch. The:titleproperty now passes(size, layout), soborder-titletakes[size layout].border-fgis preset with only the layout, so it stays[layout]. This clears thefunction takes at most 1 args, got 2log lines.justfile— addedjust docs-validate, which runs CI's exact example check locally. It clears bothdocs/.docusaurusanddocs/node_modules/.cacheso the markdown preprocessor actually re-runs; a stale webpack cache otherwise reuses processed output and silently skips validation.Test plan
just docs-validatepasses: 72 examples validated, 0 property errors.# ignorereproduces the exact CI failure (api.md:… timed out waiting for signal "my-channel", exit 1); restoring it passes.🤖 Generated with Claude Code