[Bug]: Markdown generation discards content inside Tabs components
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- markdown
調査の方向性
src/pages/[...path].md.ts から始めて、公開されている Markdown ルートを transformPageToMarkdown() までたどり、次に src/lib/markdown/transformMarkdown.ts を調べます。特に、211–224 行付近のクリーンアップルールと既存のコンポーネントハンドラーを確認してください。生成された Markdown では、各 Tabs のラベルとパネルを順番どおりに保持し、CodeSample などのネストされたコンポーネントを処理して、すべてのタブのコンテンツが残っていることを確認するテストを追加してください。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The generated .md pages omit content placed inside interactive Tabs components, creating content-parity differences between the rendered documentation and the agent-facing Markdown representation.
After previously documenting the affected pages in an agent experience audit, I encountered a similar parity issue in another documentation project. Investigating that project revealed a serialization problem, so I examined Chainlink's Markdown-generation pipeline for a comparable cause.
Chainlink's public .md route is implemented in:
The route reads the source MDX and passes it to transformPageToMarkdown(). The conversion logic is implemented in:
src/lib/markdown/transformMarkdown.ts
The transformer provides handlers for selected MDX components, including Aside, CodeSample, and CcipCommon. However, it does not provide a serialization handler for Tabs, TabsContent, or their slotted Fragment children.
The cleanup rule subsequently removes unsupported MDX flow components:
[transformMarkdown.ts, lines 211–224]
(https://github.com/smartcontractkit/documentation/blob/main/src/lib/markdown/transformMarkdown.ts#L211-L224)
When a Tabs component is removed, its Fragment panels and their commands, tables, code samples, warnings, and expected outputs are removed with it.
For example, this source structure:
<Tabs client:visible>
<Fragment slot="tab.1">Starter kit</Fragment>
<Fragment slot="tab.2">Manual</Fragment>
<Fragment slot="panel.1">
Starter-kit instructions
</Fragment>
<Fragment slot="panel.2">
Manual instructions
</Fragment>
</Tabs>
produces a Markdown representation containing neither implementation path.
To Reproduce
-
Open the rendered LockRelease Token Pool documentation page:
https://docs.chain.link/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool -
Navigate to Step 1: Deploy the LockRelease Token Pool.
-
Confirm that the page contains Starter kit and Manual tabs with deployment instructions.
-
Open the corresponding Markdown page:
https://docs.chain.link/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool.md -
Locate the same Step 1 section.
-
Observe that the Markdown moves from the introductory paragraph directly to Transfer-fee fields, omitting both tab panels.
-
Inspect the source MDX:
https://github.com/smartcontractkit/documentation/blob/main/src/content/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool.mdx -
Inspect the unsupported-component cleanup rule:
https://github.com/smartcontractkit/documentation/blob/main/src/lib/markdown/transformMarkdown.ts#L211-L224
URLs
Representative page:
- Rendered page:
https://docs.chain.link/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool - Markdown page:
https://docs.chain.link/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool.md - Source MDX:
https://github.com/smartcontractkit/documentation/blob/main/src/content/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool.mdx
Expected behavior
The Markdown transformer should preserve every tab label and its corresponding panel content.
Because Markdown is not interactive, each tab could be serialized sequentially as a labeled section. Nested components, such as CodeSample, should then be processed by their existing handlers.
No tab panel should be silently discarded.
Additional context
All affected pages are documented here: https://github.com/manueldezman/chainlink-documentation-audit.
I would be happy to submit a focused PR that adds serialization support for Tabs, TabsContent, and their Fragment panels, along with automated tests confirming that every tab label and panel remains present in the generated Markdown.
- 主要言語
- MDX
- スター
- 528
- フォーク
- 478
- 平均マージ
- 18時間 3分
- マージ済み PR(30日)
- 85
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
smartcontractkit/documentation のほかの issue
-
bug triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
smartcontractkit/documentation#4154 ·
メンテナーはふだん 1 日以内に返信
-
enhancement triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
smartcontractkit/documentation#4114 ·
メンテナーはふだん 1 日以内に返信
-
bug triage
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
smartcontractkit/documentation#1505 ·
メンテナーはふだん 1 日以内に返信
-
GHA-data-validate-urls: Invalid URLs Detected対応中かも @khadni が 4 日前に担当しました。 オープンbug gh-action-data
smartcontractkit/documentation#4222 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
GHA-data-validate-urls: Invalid URLs Detected対応中かも @khadni が 13 日前に担当しました。 オープンbug gh-action-data
smartcontractkit/documentation#4188 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
smartcontractkit/documentation の issue をすべて見る
似ている issue
-
area:docs good first issue P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
uttrflow/uttrflow-swift#3445 ·
メンテナーはふだん 1 日以内に返信
-
adr
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kristofdegrave/homeassistant-smart-charging#1607 ·
メンテナーはふだん 1 日以内に返信
-
Feature
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
Narezzurri/OpenVPN-Config-Manager#95 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
doc good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
collective/icalendar#1865 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信