Skip to content

Commit 2059721

Browse files
authored
chore(docs): improving the docs a bit more (#116)
* chore(docs): improving the docs a bit more This adds some useful extensions, links, and add. information. * fix(deps): update lockfiles no-cache
1 parent e9d28dc commit 2059721

File tree

5 files changed

+69
-4
lines changed

5 files changed

+69
-4
lines changed

docs/source/conf.py

+28
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
extensions = [
1818
"sphinx.ext.autodoc",
19+
"sphinx.ext.intersphinx",
1920
"sphinx.ext.viewcode",
21+
"sphinxext.opengraph",
2022
"sphinx_click",
2123
"myst_parser",
2224
"sphinx_copybutton",
@@ -31,3 +33,29 @@
3133

3234
html_theme = "furo"
3335
html_static_path = ["_static"]
36+
37+
html_theme_options = {
38+
"footer_icons": [
39+
{
40+
"name": "GitHub",
41+
"url": "https://github.com/jeertmans/manim-slides",
42+
"html": """
43+
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
44+
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
45+
</svg>
46+
""",
47+
"class": "",
48+
},
49+
],
50+
"source_repository": "https://github.com/jeertmans/manim-slides/",
51+
"source_branch": "main",
52+
"source_directory": "docs/source/",
53+
}
54+
55+
## -- Intersphinx mapping
56+
57+
intersphinx_mapping = {
58+
"python": ("https://docs.python.org/3", None),
59+
"manim": ("https://docs.manim.community/en/stable/", None),
60+
"manimlib": ("https://3b1b.github.io/manim/", None),
61+
}

docs/source/reference/examples.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,28 @@
22

33
Contents of `example.py`.
44

5-
Do not forget to import Manim Slides and Manim or ManimGL.
5+
Do not forget to import Manim Slides and Manim or ManimGL:
6+
7+
```python
8+
from manim import *
9+
from manim_slides import Slide, ThreeDSlide
10+
```
11+
12+
or
13+
14+
```python
15+
from manimlib import *
16+
from manim_slides import Slide, ThreeDSlide
17+
```
18+
19+
Then, each presentation, named `SCENE`, was generated with those two commands:
20+
21+
```bash
22+
manim example.py SCENE # or manimgl example SCENE
23+
manim-slides convert SCENE -ccontrols=true
24+
```
25+
26+
where `-ccontrols=true` indicates that we want to display the blue navigation arrows.
627

728
## Basic Example
829

manim_slides/slide.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def reverse_video_file(src: str, dst: str) -> None:
2727

2828
class Slide(Scene): # type:ignore
2929
"""
30-
Inherits from :class:`manim.Scene` or :class:`manimlib.Scene` and provide necessary tools for slides rendering.
30+
Inherits from :class:`manim.scene.scene.Scene` or :class:`manimlib.scene.scene.Scene` and provide necessary tools for slides rendering.
3131
"""
3232

3333
def __init__(
@@ -229,7 +229,7 @@ def render(self, *args: Any, **kwargs: Any) -> None:
229229

230230
class ThreeDSlide(Slide, ThreeDScene): # type: ignore
231231
"""
232-
Inherits from :class:`Slide` and :class:`manim.ThreeDScene` or :class:`manimlib.ThreeDScene` and provide necessary tools for slides rendering.
232+
Inherits from :class:`Slide` and :class:`manim.scene.three_d_scene.ThreeDScene` or :class:`manimlib.scene.three_d_scene.ThreeDScene` and provide necessary tools for slides rendering.
233233
234234
.. note:: ManimGL does not need ThreeDScene for 3D rendering in recent versions, see `example.py`.
235235
"""

poetry.lock

+16-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ myst-parser = "^0.18.1"
8888
sphinx = "^5.3.0"
8989
sphinx-click = "^4.4.0"
9090
sphinx-copybutton = "^0.5.1"
91+
sphinxext-opengraph = "^0.7.5"
9192

9293
[tool.poetry.group.test.dependencies]
9394
manim = "^0.17.0"

0 commit comments

Comments
 (0)