Skip to content

[DRAFT] Feat/markdown export - #586

Closed
databyjp wants to merge 8 commits into
mainfrom
feat/markdown-export
Closed

databyjp wants to merge 8 commits into
mainfrom
feat/markdown-export

Conversation

@databyjp

Copy link
Copy Markdown
Contributor

What's being changed:

Add Markdown versions of docs at .md suffix paths

Type of change:

  • Documentation content updates (non-breaking change to fix/update documentation )
  • Bug fix (non-breaking change to fixes an issue with the site)
  • Feature or enhancements (non-breaking change to add functionality)

How has this been tested?

  • Local build - the site works as expected when running yarn start

databyjp and others added 8 commits October 28, 2026 22:09
Interface-only checkpoint for review: route-to-.md path mapping, the
HTML-to-Markdown conversion contract, the postBuild plugin contract and
the Accept-negotiation edge function contract. Every function throws
"Not implemented"; nothing is registered in docusaurus.config.js or
declared in netlify.toml, so builds and deploys are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build: a postBuild plugin (src/plugins/markdown-export) converts each
rendered docs page to <route>.md, keeping every code tab variant with
its label, admonitions as GitHub alerts, KaTeX source, images, and
Mermaid source (exposed by a theme wrapper, since Mermaid renders in
the browser). A conversion error fails the build.

Discovery: docs pages get <link rel="alternate" type="text/markdown">
and a visually hidden notice. The markdown-negotiation edge function
serves the .md to requests whose Accept header prefers text/markdown
and falls back to the normal response when no .md exists.

Tests run with node --test and in the PR workflow. The commented-out
signalwire llms-txt config is removed; the package itself still needs
`yarn remove`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Table cells with block content keep one line per block, joined by <br>.
- Cards that are one big link keep their content and get one link,
  labelled with the button text.
- Font Awesome icons no longer leave empty `**` emphasis.
- Admonition and details titles keep their links; bold inside a title is
  unwrapped instead of nested.
- Mermaid source travels URI-encoded in data-markdown-content: the rspack
  HTML minifier turned the text `&amp;&lt;br>` into a <br> element.
- DeploymentCards stage tabs are marked data-copy-exclude.
- IdAnatomy hides its grid from screen readers and the export, and adds a
  visually hidden list grouped by part.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scalar renders /weaviate/api/rest and /engram/api/rest in the browser, so
their HTML has nothing to convert. The plugin now converts each Scalar
page's spec file (static/specs/*.json) with @scalar/openapi-to-markdown:

- /weaviate/api/rest.md: introduction, then each tag's operations and a
  link to its file; /weaviate/api/rest/<tag>.md: the full reference for
  one tag. The whole document is about 490 KB, too large for one fetch.
- /engram/api/rest.md: the whole reference, as its spec declares no tags.

Both pages also get <link rel="alternate"> tags for the Markdown and the
spec. The converter requires Node 22.19, so engines.node is raised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Mark the "Questions and feedback" heading data-copy-exclude with a
  remark plugin. Its section body is already excluded, so 327 Markdown
  files and the "Copy page" output ended with an empty heading.
- Cards with a title and description become `[Title](url): Description`
  instead of two links to the same URL.
- Fragment links get the page URL, because Markdown headings lose custom
  heading IDs such as #no-vector.
- Badge links under code blocks become one `See also:` line instead of
  links run together.
- ErrorDocs step numbers are data-copy-exclude, so the Markdown no longer
  reads "1. 1".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The edge function fetches the .md with redirect: "manual". A moved
  page's .md path can match a wildcard redirect (/weaviate/schema/* to
  /weaviate/manage-collections); following it served that page's HTML
  as Markdown with status 200, instead of the page's own redirect.
- A button inside a paragraph keeps its text, so the quickstarts read
  "use the Ask AI feature" instead of "use the feature".
- The README states the Node version the tests need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Warning SAST high 1   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca
🛡️ The following SAST misconfigurations have been detected
NAME FILE
high User Controlled URL in HTTP Client Libraries May Lead to SSRF ...kdown-negotiation.ts View in code

Note: The scan should have failed if no policies were configured in warn-only mode.

@databyjp databyjp closed this Nov 2, 2026
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.

1 participant