Unfurl MultiLangCodeBlock examples in generated markdown - #1569
Unfurl MultiLangCodeBlock examples in generated markdown#1569MikeCarbone wants to merge 2 commits into
Conversation
Generated LLM/markdown pages left <MultiLangCodeBlock /> tags unresolved (or stripped them in API overview content). Resolve snippets to a single preferred language (Node.js, matching the docs UI default) so copied and llms.txt content includes real example code without every language variant. Co-authored-by: Mike Carbone <MikeCarbone@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@cursor this doesn't seem to work. For example, the API reference page, I'd expect there to be an example Request CURL and a response in the markdown. Instead, this is what I see. Compared to the screenshot that has a lot more info. |
|
The first fix only covered docs I updated
|
API method pages only emitted params and response JSON, so Copy for LLM missed the request example shown in the UI. Reuse the stainless snippet plus synthesized cURL path and unfurl a single preferred language (cURL) into each generated method page. Co-authored-by: Mike Carbone <MikeCarbone@users.noreply.github.com>
|
Good catch — the first change only covered docs Pushed a follow-up that:
|


Description
Generated markdown pages (
Copy for LLM,Accept: text/markdown,llms.txt) were missing usable example code in two places:<MultiLangCodeBlock />tags unresolved (or stripped them in API overview content).x-stainless-snippets).This unfurls a single preferred example per block:
MultiLangCodeBlock: prefer Node.js (docs UI default)Changes:
data/code/snippets.ts<MultiLangCodeBlock />inconvertMdxForLlmand API overview markdowngetMethodMarkdownContentto emit a request example viaaugmentSnippetsWithCurlRequest, preferring cURLTasks
Linear Issue: KNO-14441