Skip to content

fix(site): normalize generated doc links#1546

Merged
chaliy merged 1 commit intomainfrom
fix/site-doc-link-rendering
May 6, 2026
Merged

fix(site): normalize generated doc links#1546
chaliy merged 1 commit intomainfrom
fix/site-doc-link-rendering

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 6, 2026

What

Fix bashkit.sh generated docs output so repository-internal markdown links do not render as local /docs/.../*.md URLs, and rustdoc hidden setup lines do not appear in public Rust code examples.

Why

Crawler reports showed 400-499 errors for local markdown routes such as /docs/specs/implementation-status.md. The public docs also exposed rustdoc-only hidden lines like # #[tokio::main] in examples.

How

  • Rewrite Astro-rendered /docs/.../*.md links to canonical site routes or GitHub source links.
  • Add a generated HTML verifier that rejects local markdown hrefs.
  • Add a generated HTML normalization step that strips rustdoc # hidden lines from Rust code blocks and fails if any remain.

Risk

  • Low
  • Site build output changes only for generated docs links and Rust code block display.

Checklist

  • Tests added or updated
  • Backward compatibility considered

Verified locally:

  • npm run build
  • npm run check
  • just test
  • just pre-pr

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 6, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit ced3c88 Commit Preview URL

Branch Preview URL
May 06 2026, 03:37 AM

Comment thread site/scripts/normalize-generated-html.mjs Fixed
Comment thread site/scripts/normalize-generated-html.mjs Fixed
@chaliy chaliy force-pushed the fix/site-doc-link-rendering branch from 45824ad to 93a9b75 Compare May 6, 2026 03:34
Comment thread site/scripts/normalize-generated-html.mjs Fixed
@chaliy chaliy force-pushed the fix/site-doc-link-rendering branch from 93a9b75 to ced3c88 Compare May 6, 2026 03:36
@chaliy chaliy merged commit 529bb97 into main May 6, 2026
16 checks passed
@chaliy chaliy deleted the fix/site-doc-link-rendering branch May 6, 2026 03:48
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