Skip to content

Infra] Support Markdown/Notebook-Friendly Documentation Export for Downstream Integration #18081

@zhaochenyang20

Description

@zhaochenyang20

Checklist

Motivation

Currently, SGLang's documentation system uses a make compile instruction that targets HTML for immediate online display. This "HTML-only" output creates a bottleneck for downstream systems (like internal documentation platforms or LLM-based RAG pipelines) that require structured data.

We need to modify the documentation pipeline so that the make compile command preserves the intermediate Markdown or generates Jupyter Notebook (.ipynb) files as primary artifacts, rather than just treating them as transient steps toward an HTML file.

Problem Statement

The current build process couples content to style too early:

  • Transient Markdown: The source Markdown is often discarded or transformed into HTML fragments that lose semantic structure.
  • Downstream Incompatibility: Systems requiring GPT Notebook or raw Markdown cannot ingest the current HTML output without fragile parsing.
  • Metadata Loss: Important structural markers (callouts, specific code block metadata) are often lost during the final HTML render.

Goals

  1. Preserve Source Integrity: The make compile command must ensure that the output directory contains the structured Markdown or Jupyter Notebook version of the docs.
  2. Notebook-First Workflow: Ensure that code blocks and metadata remain intact in a format that can be easily converted to or stored as Jupyter Notebooks.
  3. Dual-Path Output: The system should still support the current web display, but the "source of truth" for downstream consumers must be the stable Markdown/Notebook artifacts.

Technical Tasks

  • Pipeline Audit: Modify the existing Makefile and compilation scripts to prevent the deletion of intermediate Markdown files.
  • Structured Export: Ensure the make compile process produces a version of the documentation where content (Markdown/Notebook) is decoupled from the HTML CSS/JS.
  • Semantic Retention: Verify that custom components (e.g., specific SGLang callouts or specialized code blocks) are preserved in the Markdown output using standard semantic markers.
  • Validation: Run a test to confirm the output artifacts can be successfully ingested by a standard Markdown-to-Notebook converter without losing heading hierarchies or code block functionality.

Implementation Note

We want to keep the developer experience consistent. The workflow should still be triggered via:

make compile

However, the result should be a directory of persistent, structured files (Markdown/Notebooks) ready for downstream redistribution, in addition to or instead of the raw HTML blobs.

Calling all contributors interested in DevX and Documentation Infra! Help us move SGLang toward a more portable, "LLM-ready" documentation architecture.


Suggested Labels

infrastructure, documentation, build-system

Related resources

No response

Metadata

Metadata

Labels

documentationImprovements or additions to documentationgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions