Skip to content

Feat: Implement Automated MDX Documentation Generator #207

@MichaelFisher1997

Description

@MichaelFisher1997

Summary

Implement a Zig-based documentation generator (tools/docgen.zig) that uses std.zig.Ast to extract documentation from source files and output MDX files compatible with Docusaurus.

Requirements (Zig Side)

  • Static Analysis: Must use std.zig.Ast to parse Zig source without compilation.
  • Extraction:
    • Module-level documentation (//!).
    • Doc comments (///) for all pub declarations (structs, enums, functions, constants).
    • Reconstruction of function signatures and type definitions.
  • Structure: Output MDX files should mirror the src/ directory structure in a target directory (e.g., docs/generated/).
  • Build System: Integrate as a build step (zig build docs).

Requirements (CI/Pipeline)

  • GitHub Action: Automate the generation on push to main.
  • Artifacts: Upload the generated MDX files as a build artifact for consumption by the Docusaurus site repo.

Information for Doc Site Builders

  • Output Format: Standard MDX files with YAML frontmatter.
  • Asset Handling: Any images or diagrams in doc comments should refer to absolute paths in the engine repo or a shared CDN.
  • Sidebar Integration: The generated directory structure is intended to be used with Docusaurus's autogenerated sidebars.
  • Custom Components: The MDX will use standard Markdown blocks for code ( zig), so ensure a Zig syntax highlighter is configured in Docusaurus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions