Sphinx Python Domain to DocFX YAML Generator
Project description
Sphinx DocFX YAML
=================
.. image:: https://travis-ci.org/docascode/sphinx-docfx-yaml.svg?branch=master
:target: https://travis-ci.org/docascode/sphinx-docfx-yaml
Sphinx DocFX YAML is an exporter for the Sphinx Autodoc module into `DocFX YAML <https://dotnet.github.io/docfx/spec/metadata_format_spec.html>`_.
You can read the full documentation online at http://sphinx-docfx-yaml.readthedocs.io
Contents
--------
.. toctree::
:glob:
:maxdepth: 2
design
layout
api
Basic Workflow
--------------
* Write RST that includes Python `autodoc <www.sphinx-doc.org/en/stable/ext/autodoc.html>`_
* Render internal doctree into YAML
* Output YAML into output directory
Install
-------
First you need to install docfx-yaml:
.. code:: bash
pip install sphinx-docfx-yaml
Then add it to your Sphinx project's ``conf.py``:
.. code:: python
# Order matters here.
# The extension must be defined *after* autodoc,
# because it uses a signal that autodoc defines
extensions = ['sphinx.ext.autodoc', 'docfx_yaml.extension']
Make sure you are using autodoc in your code somewhere::
.. automodule:: foo.bar
Then build your documentation::
make html
Inside your build directory (``_build/html`` usually),
the ``docfx_yaml`` will contain the YAML files that are output.
.. Modes
-----
There are two output modes that specify the structure of the YAML files.
The first is ``module`` which means that the YAML files will be output in files corresponding to the name of their module.
The second modes is ``rst`` which outputs them in the same structure as the RST files they were defined in.
Design
------
Read more about the design in our :doc:`design`.
Layout
------
This project has a few different pieces at this point.
It's primary goal was to integrate the Azure Python SDK into the docfx tooling.
You can read more about the pieces currently set up in the :doc:`layout`.
Napoleon Support
----------------
We support ``sphinx.ext.napoleon`` for parsing docstrings in other formats.
Currently all markup that maps to existing Sphinx `info field lists <http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists>`_ will work,
along with ``Examples``.
In order to pull examples out,
you need the ``napoleon_use_admonition_for_examples`` set to ``True``.
=================
.. image:: https://travis-ci.org/docascode/sphinx-docfx-yaml.svg?branch=master
:target: https://travis-ci.org/docascode/sphinx-docfx-yaml
Sphinx DocFX YAML is an exporter for the Sphinx Autodoc module into `DocFX YAML <https://dotnet.github.io/docfx/spec/metadata_format_spec.html>`_.
You can read the full documentation online at http://sphinx-docfx-yaml.readthedocs.io
Contents
--------
.. toctree::
:glob:
:maxdepth: 2
design
layout
api
Basic Workflow
--------------
* Write RST that includes Python `autodoc <www.sphinx-doc.org/en/stable/ext/autodoc.html>`_
* Render internal doctree into YAML
* Output YAML into output directory
Install
-------
First you need to install docfx-yaml:
.. code:: bash
pip install sphinx-docfx-yaml
Then add it to your Sphinx project's ``conf.py``:
.. code:: python
# Order matters here.
# The extension must be defined *after* autodoc,
# because it uses a signal that autodoc defines
extensions = ['sphinx.ext.autodoc', 'docfx_yaml.extension']
Make sure you are using autodoc in your code somewhere::
.. automodule:: foo.bar
Then build your documentation::
make html
Inside your build directory (``_build/html`` usually),
the ``docfx_yaml`` will contain the YAML files that are output.
.. Modes
-----
There are two output modes that specify the structure of the YAML files.
The first is ``module`` which means that the YAML files will be output in files corresponding to the name of their module.
The second modes is ``rst`` which outputs them in the same structure as the RST files they were defined in.
Design
------
Read more about the design in our :doc:`design`.
Layout
------
This project has a few different pieces at this point.
It's primary goal was to integrate the Azure Python SDK into the docfx tooling.
You can read more about the pieces currently set up in the :doc:`layout`.
Napoleon Support
----------------
We support ``sphinx.ext.napoleon`` for parsing docstrings in other formats.
Currently all markup that maps to existing Sphinx `info field lists <http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists>`_ will work,
along with ``Examples``.
In order to pull examples out,
you need the ``napoleon_use_admonition_for_examples`` set to ``True``.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for sphinx_docfx_yaml-1.2.40-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33aac10dfd07a51f433b04d45c2a7c4db1ac8b6cde51d29230c6fb8807c98528 |
|
MD5 | 506b69b162cb0af432f4fa026a0956cc |
|
BLAKE2b-256 | 0b2f57bf7c3b794e00328b11d2260d6592397522f9a93abc8929220fff9c0748 |