Skip to content

Compile MDX documentation to HTML during release#64

Closed
gontzess wants to merge 1 commit intomainfrom
gontzess/docs-html
Closed

Compile MDX documentation to HTML during release#64
gontzess wants to merge 1 commit intomainfrom
gontzess/docs-html

Conversation

@gontzess
Copy link
Copy Markdown
Contributor

Why

The registry UI can't use @mdx-js/mdx runtime compilation in the browser because the CloudFront CSP policy blocks unsafe-eval. The registry API now accepts a documentation_html field (ductone/connector-registry-api#90) containing pre-rendered HTML that the browser can display directly.

What this changes

Adds a compilation step to the release workflow that converts docs/connector.mdx to static HTML before calling record-release. The compiled HTML is sent alongside the raw MDX via a new -docs-html flag.

  • cmd/record-release/mdx-compile.mjs — Node CLI that compiles MDX to HTML with Mintlify component mappings
  • cmd/record-release/package.json — minimal Node dependencies for the compiler
  • cmd/record-release/main.go — new -docs-html flag and documentationHtml request field
  • .github/workflows/release.yaml — new "Compile documentation to HTML" step with continue-on-error: true (compilation failure doesn't block the release)

Depends on ductone/connector-registry-api#90 being deployed first (adds the documentation_html proto field).

… API

The registry UI renders documentation via dangerouslySetInnerHTML from
pre-compiled HTML to avoid CSP unsafe-eval restrictions. This adds the
compilation step to the release workflow so new releases get both raw MDX
and compiled HTML.

- Add mdx-compile.mjs and package.json to cmd/record-release for Node deps
- Add "Compile documentation to HTML" workflow step (runs before record-release)
- Add -docs-html flag to record-release binary
- Add documentationHtml field to RecordReleaseRequest
@gontzess
Copy link
Copy Markdown
Contributor Author

Moving compilation out of the release pipeline to avoid introducing npm/Node into the security-sensitive release workflow. Will use admin API endpoints + export cron instead.

@gontzess gontzess closed this Mar 24, 2026
@gontzess gontzess deleted the gontzess/docs-html branch March 24, 2026 15:24
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