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

Aperta
#33,908 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
64/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
markdown, typescript
Ambito
documentation

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)
Lingua principale
MDX
Stelle
5.4k
Fork
17.3k
Merge medio
1g 21h
PR unite (30g)
529

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/cloudflare-docs

Tutte le issue di cloudflare/cloudflare-docs

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.