Skip to content

fix(docs): close admonitions that swallowed the rest of the page - #629

Merged
zachfedor merged 2 commits into
mainfrom
fix/docs-admonitions
Oct 16, 2026
Merged

zachfedor merged 2 commits into
mainfrom
fix/docs-admonitions

Conversation

@zachfedor

Copy link
Copy Markdown
Contributor

Three admonitions added in #612 never close on the deployed site, so everything after them renders inside the box:

  • configuration.md: the environments.toml note near the top and the "build supports only workspace/contract" caution
  • extensions.md: the environments.toml note

Cause. The docs' Prettier config sets proseWrap: "never", which joins each paragraph onto one line. An admonition written without blank lines around its body is a single paragraph, so Prettier turns it into :::note … :::. Docusaurus only recognizes ::: as a closing fence on its own line. The Docusaurus docs recommend putting blank lines around the body, which is the form every other admonition on the site already uses.

Changes

  • Rewrote the three admonitions with blank lines around their bodies.
  • Added lint:admonitions and made npm run linter (already run by website.yml) call it. It fails on any admonition that opens and closes on the same line. Prettier accepts that line, so the check has to be separate. It uses POSIX character classes so it also works with macOS's grep.

Testing

  • With the guard but without the fix, npm run linter fails and lists the three lines.
  • With the fix, it passes.
  • docusaurus build --locale en succeeds. In the built HTML, each of the three admonitions contains only its own text, and no stray ::: remains on either page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QhmaWLv4yExX8LahP5UtUb

zachfedor and others added 2 commits October 16, 2026 13:32
proseWrap: never joins an admonition without blank lines into a single
':::note ... :::' line, which Docusaurus never closes, so the rest of the
page renders inside it. Prettier accepts that line, so check for it
separately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhmaWLv4yExX8LahP5UtUb
Prettier's proseWrap: never joins a paragraph onto one line, so an
admonition written without blank lines around its body ended up as
':::note ... :::' and Docusaurus never saw the closing fence. Blank lines
keep the opening, body and closing fence in separate paragraphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhmaWLv4yExX8LahP5UtUb
@zachfedor
zachfedor requested a review from chadoh October 16, 2026 17:38

@chadoh chadoh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love an inline bash script linter. The platonic ideal of simplicity.

@zachfedor
zachfedor merged commit 571f94b into main Oct 16, 2026
4 checks passed
@zachfedor
zachfedor deleted the fix/docs-admonitions branch October 16, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants