lsdocs #
lsdocs builds documentation sites from Markdown and reStructuredText. Every step of a build is a plugin: parsers turn source files into document trees, transformers rewrite the trees, and renderers write the output. The first-party plugins cover a typical site; your own can be written in Rust, Python, JavaScript, or any language that can read and write MessagePack.
- Getting started: install lsdocs, create a site, build and serve it.
- Configuration: everything
lsdocs.tomlaccepts. - Writing pages: what Markdown and reStructuredText give you.
- Themes: choose and set up the look of the HTML output.
- Built-in plugins: the plugins that ship with lsdocs and their settings.
- Writing plugins: how a build works and how to add to it, with guides for Rust, Python, JavaScript and other languages.
- Reference: the document tree, the protocol and the HTML markup themes style.
How a build works #
- lsdocs finds the files under the source directory.
- It starts the configured plugins, in-process (built-in ones) or as child processes (yours), and asks each what it can do.
- Each source file is parsed by the first parser that takes its extension. Other files are copied to the output as they are.
- lsdocs gives sections and headings ids and resolves links between documents.
- Each transformer runs over the documents in turn, in the order the configuration lists them.
- The renderer writes each document, and any site-wide files such as a sitemap.
Because every parser produces the same tree, transformers and renderers work with every source format.