Skip to main content

A Sphinx extension to add markdown generation support.

Project description

sphinx-markdown-builder

Coverage Status

A Sphinx extension to add markdown generation support.

Install

pip3 install sphinx-markdown-builder==0.6.5

Usage

Add the extension to your conf.py file:

extensions = [
    ...,
    "sphinx_markdown_builder",
    ...,
]

Build markdown files with sphinx-build command

sphinx-build -M markdown ./docs ./build

Configurations

You can add the following configurations to your conf.py file:

  • markdown_anchor_sections/markdown_anchor_signatures: If set to True, then anchors will be added before each section/function/class signature. This allows references to a specific anchor in the document.
  • markdown_docinfo: Adds metadata to the top of each document containing author, copyright, and version.
  • markdown_http_base: If set, all references will link to this prefix address
  • markdown_uri_doc_suffix: If set, all references will link to documents with this suffix.

For example, if your conf.py file have the following configuration:

markdown_http_base = "https://your-domain.com/docs"
markdown_uri_doc_suffix = ".html"

Then a reference to your-doc-name#your-header will be substituted with https://your-domain.com/docs/your-doc-name.html#your-header.

Credits

This project forked from clayrisser/sphinx-markdown-builder, which was developed by Clay Risser under the MIT license.

The original implementation was based on doctree2md by Matthew Brett under the BSD-2 license.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-markdown-builder-0.6.5.tar.gz (20.4 kB view hashes)

Uploaded Source

Built Distribution

sphinx_markdown_builder-0.6.5-py3-none-any.whl (16.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page