feat(lib/docs): add sphinx directive (#216)

This PR adds a new Sphinx directive, inspired by the Manim one. This directive is also used within the docs to display examples.
This commit is contained in:
Jérome Eertmans
2023-07-19 17:11:58 +02:00
committed by GitHub
parent 86aeeb861b
commit 540c7034c8
8 changed files with 529 additions and 53 deletions

View File

@ -15,15 +15,23 @@ author = "Jérome Eertmans"
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
# Built-in
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
# Additional
"myst_parser",
"sphinxext.opengraph",
"sphinx_click",
"myst_parser",
"sphinx_copybutton",
# Custom
"manim_slides.docs.manim_slides_directive",
]
typehints_defaults = "comma"
typehints_use_signature = True
typehints_use_signature_return = True
myst_enable_extensions = [
"colon_fence",
"html_admonition",

View File

@ -6,7 +6,7 @@ Therefore, we only document here the methods we think the end-user will ever use
```{eval-rst}
.. autoclass:: manim_slides.Slide
:members: start_loop, end_loop, pause, next_slide
:members: start_loop, end_loop, pause, next_slide, wipe
.. autoclass:: manim_slides.ThreeDSlide
:members:

View File

@ -11,6 +11,7 @@ examples
gui
html
sharing
Sphinx Extension <sphinx_extension>
```
[Application Programming Interface](./api): list of classes and methods that may

View File

@ -0,0 +1,6 @@
# Manim Slides' Sphinx directive
```{eval-rst}
.. automodule:: manim_slides.docs.manim_slides_directive
:members:
```