Changelog Markdown is lossy: index.md.xml serves HTML, and index.md flattens tabs, captions, and callouts

Đang mở
#33,908 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
64/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown, typescript
Lĩnh vực
documentation

Hướng nghiên cứu

Start with getEntryMarkdown and the changelog-related code in src/util/changelog.ts and src/util/rss.ts, then inspect the route that serves index.md.xml. Read renderEntryAsMarkdown on nimbus main at commit 3f1f58d and reproduce the listed feed and post examples. Done means the feed contains Markdown and post output preserves labels, callouts, code samples, package-manager flags, and removes decorative glyphs.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

engineering
Example URL(s)
Actual Behavior
  1. /changelog/rss/index.md.xml serves HTML. index.md.xml.ts calls the same getRSSItems() as the HTML feed; the header of src/util/changelog.ts notes the Markdown variant was not ported to Nimbus.
  2. Post index.md output (Markdown for Agents conversion of the rendered HTML) loses component meaning: package-manager tabs become npmyarnpnpmbun plus four unlabeled code blocks, code captions become *src/index.jsjs*, JS/TS examples appear twice unlabeled, callouts become a bare Note line, and links keep the ↗︎ glyph.
Expected Behavior

The Markdown feed contains Markdown, and post Markdown keeps component meaning: one labeled command block, one TypeScript sample, labeled callouts, no decorative glyphs.

Additional information

getEntryMarkdown from @cloudflare/nimbus-docs/runtime produces clean Markdown for these posts and could back index.md.xml (about 40 lines in src/util/changelog.ts, src/util/rss.ts, and the route; I can open a PR). On nimbus main (3f1f58d), renderEntryAsMarkdown has three gaps that affect it:

  • top-level MDX import lines are emitted verbatim
  • :::note admonitions stay as raw directive syntax
  • <PackageManagers … global /> drops the global flag (npm i cf instead of npm install --global cf)
Ngôn ngữ chính
MDX
Star
5.4k
Fork
17.3k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
498

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudflare/cloudflare-docs

Tất cả issue của cloudflare/cloudflare-docs

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.