Skip to content

Repository files navigation

mkdocstrings-luau

A Luau handler for mkdocstrings.

ci documentation pypi version


A Luau handler for mkdocstrings.

Installation

pip install mkdocstrings-luau

Features

  • Data collection from Moonwave comments: collection of the object-tree and docstrings is done thanks to Moonwave (moonwave-extractor), or from a prebuilt Moonwave JSON file.

  • Support for Luau type annotations: parameter and return types from Moonwave tags and Luau signatures are rendered in the docs. With cross-references enabled, types that name documented objects become links. See how to load inventories to link across projects.

  • Class-scoped documentation: inject a class with ::: Class (or a member with ::: Class.member / ::: Class:method) and get its full API—properties, events, types, functions, and methods—without documenting each member separately.

  • Moonwave docstring support: --[=[ blocks or --- lines with tags such as @class, @param, @return, @error, @prop, @type / @interface, @deprecated, @since, and more. See Moonwave's documentation on comment syntax.

  • Rich member metadata: labels for deprecated, private, unreleased, static, yields, readonly, realms, and custom tags. @deprecated is rendered as a warning admonition.

  • Every object has a TOC entry: we render a heading for each object, so MkDocs picks them into the Table of Contents (especially nice with the Material theme). Cross-reference objects with the classic Markdown syntax: [this object][Class.member] or Moonwave-style [Class:method].

  • Source code display: mkdocstrings can add a collapsible section with the highlighted declaration source for the Luau object.

Releases

Sponsor this project

Used by

Contributors

Languages