Skip to content

fix: use generic auto-generated comment in gen-docs output - #981

Closed
chaptersix wants to merge 2 commits into
mainfrom
fix/gen-docs-autogenerated-comment
Closed

fix: use generic auto-generated comment in gen-docs output#981
chaptersix wants to merge 2 commits into
mainfrom
fix/gen-docs-autogenerated-comment

Conversation

@chaptersix

Copy link
Copy Markdown
Contributor

The previous comment hardcoded a specific file path and tool path that was incorrect and won't hold for inputs from other repos (e.g. cloud-cli). Replace with a generic message.

@chaptersix
chaptersix requested a review from a team as a code ownerApril 15, 2026 19:02
chaptersix added a commit that referenced this pull request Jul 8, 2026
…#1112)
## Summary
This consolidates the excellent groundwork in #980, #1076, and #981 into
a single change, and verifies the result against a real Docusaurus
3.10.1 build. Huge thanks to @lennessyy — the approach here is entirely
built on those PRs; this just stitches them together and irons out a few
interactions between them.
gen-docs now escapes the patterns that break Docusaurus MDX (JSX)
compilation, on **every** path that writes a command description
(including the new split paths):
- bare angle-bracket placeholders in prose (e.g.
`<base64-encoded-cert>`, `<key>`) → `\<...\>`
- single-quoted JSON examples (e.g. `'{"a":"b"}'`, `'Key={"a":"b"}'`) →
braces escaped in body text, backticked in option tables
- custom heading IDs (e.g. `## Heading {#id}`) → `{/* #id */}`, the form
that compiles under Docusaurus 3.10 and still produces the custom anchor
Fenced code blocks and inline code spans are left untouched.
It also adds the `-subdir` flag (subcommands of the named command are
written to a subdirectory, e.g. `-subdir cloud` → `cloud/*.mdx`, with
deeper subcommands nested as headings), and a generic auto-generated
notice.
## What changed relative to the existing PRs
All three PRs were on the right track. The differences here are about
how they interact:
- **#1076 (MDX escaping):** kept as the core of this change, including
the `{#id}` → `{/* #id */}` heading conversion — which I confirmed is
exactly right for the 3.10 upgrade (see verification below). Escaping is
now also applied to the `-subdir` split output, so cloud docs get the
same treatment. Re-added unit tests for the escaping logic.
- **#980 (`-subdir`):** kept the split mechanism. Unified the
`encodeJSONExample` regex so it matches both `'{...}'` and `'Key={...}'`
(the standalone-vs-key-value cases the two PRs handled separately).
Intentionally did **not** carry over #980's index-page generation:
`command-reference/index.mdx` and `cloud/index.mdx` are hand-maintained
on the docs site (custom ordering, the `ReleaseNoteHeader` component),
so gen-docs deliberately does not emit them — generating them would
overwrite that curated content. The companion docs PR restores those
files after each regeneration.
- **#981 (generic notice):** folded in — the previous notice pointed at
paths that no longer exist and don't hold for cloud-cli inputs.
## Companion PR
temporalio/documentation#4836
Sign up for freeto 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

@chaptersix