Skip to content

A Sphinx extension to embed source code blocks directly into documentation

License

Notifications You must be signed in to change notification settings

TDKorn/sphinx-inlinecode

Repository files navigation

sphinx-inlinecode

sphinx-inlinecode PyPI Version sphinx-inlinecode GitHub Repository https://static.pepy.tech/personalized-badge/sphinx-inlinecode?period=total&units=none&left_color=grey&right_color=blue&left_text=Downloads sphinx-inlinecode Documentation Status

sphinx-inlinecode is a Sphinx extension that embeds source code blocks directly into your documentation as a dropdown.

Example

embedded code block added by sphinx-inlinecode

Unlike sphinx.ext.viewcode, source code blocks will also be added for property and cached_property entries

Installation

To install sphinx-inlinecode via pip:

pip install sphinx-inlinecode

Configuration

Add the extension to your conf.py

extensions = [
    "sphinx_inlinecode",
]

Documentation

Full documentation can be found on ReadTheDocs