Metadata-Version: 2.1
Name: sphinx-inlinecode
Version: 2.0.0
Summary: A Sphinx extension to embed source code blocks directly into documentation
Home-page: https://github.com/tdkorn/sphinx-inlinecode
Author: Adam Korn
Author-email: hello@dailykitten.net
License: MIT License
Download-URL: https://github.com/TDKorn/sphinx-inlinecode/tarball/main
Keywords: sphinx,viewcode,sphinx-extension,sphinx-contrib,code-block,inline-code,sphinx-ext,inline,embed,documentation
Platform: UNKNOWN
Classifier: Framework :: Sphinx :: Extension
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Description-Content-Type: text/x-rst; charset=UTF-8
License-File: LICENSE

.. |.functools.cached_property+cached_property| replace:: ``cached_property``
.. _.functools.cached_property+cached_property: https://docs.python.org/3/library/functools.html#functools.cached_property
.. |.property| replace:: ``property``
.. _.property: https://docs.python.org/3/library/functions.html#property
.. |.sphinx.ext.viewcode| replace:: ``sphinx.ext.viewcode``
.. _.sphinx.ext.viewcode: https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html#module-sphinx.ext.viewcode


.. meta::
   :author: Adam Korn
   :title: sphinx-inlinecode - embed source code blocks directly into Sphinx documentation
   :description: A Sphinx extension to embed source code blocks directly into Sphinx documentation


sphinx-inlinecode
--------------------

.. image:: https://img.shields.io/pypi/v/sphinx-inlinecode?color=eb5202
   :target: https://pypi.org/project/sphinx-inlinecode/
   :alt: sphinx-inlinecode PyPI Version

.. image:: https://img.shields.io/badge/GitHub-sphinx--inlinecode-4f1abc
   :target: https://github.com/tdkorn/sphinx-inlinecode/
   :alt: sphinx-inlinecode GitHub Repository

.. image:: https://static.pepy.tech/personalized-badge/sphinx-inlinecode?period=total&units=none&left_color=grey&right_color=blue&left_text=Downloads
    :target: https://pepy.tech/project/sphinx-inlinecode/

.. image:: https://readthedocs.org/projects/sphinx-inlinecode/badge/?version=latest
    :target: https://sphinx-inlinecode.readthedocs.io/en/latest/?badge=latest
    :alt: sphinx-inlinecode Documentation Status

|

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


**Example**


.. image:: https://raw.githubusercontent.com/TDKorn/sphinx-inlinecode/main/docs/source/_static/example.png
   :alt: embedded code block added by sphinx-inlinecode





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


Installation
~~~~~~~~~~~~

To install ``sphinx-inlinecode`` via pip::

   pip install sphinx-inlinecode


Configuration
~~~~~~~~~~~~~~

Add the extension to your ``conf.py``

.. code-block:: python

   extensions = [
       "sphinx_inlinecode",
   ]



Documentation
~~~~~~~~~~~~~~~

Full documentation can be found on |RTD|_


.. |RTD| replace:: ReadTheDocs
.. _RTD: https://sphinx-inlinecode.readthedocs.io/en/latest/



