Skip to content

Commit 2cfa3e5

Browse files
committed
fix img path to ../img/
1 parent 8c739ba commit 2cfa3e5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

book/lectures/205-package_documentation_python.qmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ title: "Package Documentation: Python"
1010

1111
In Python, we use formatted docstrings to generate our code-level documentation.
1212
We then use a tool called [`sphinx`](https://www.sphinx-doc.org/en/master/index.html)
13-
to take those formatted docstrings to generate our API reference documentation
13+
to take those formatted docstrings to generate our API reference documentation
1414
for our package website, and several of our Markdown files in our packages
15-
GitHub repository to generate other pages for our package website
15+
GitHub repository to generate other pages for our package website
1616
(Contributing, Code of Conduct, etc).
1717
We then serve the website up on some platform, such as [Read the Docs](https://readthedocs.org/)
1818
(others exist as well).
@@ -65,7 +65,7 @@ that are needed for this to work.
6565
-------
6666
bool
6767
Description of return value
68-
68+
6969
Examples
7070
--------
7171
>>> my_funtion(4)
@@ -82,23 +82,23 @@ How do we add new pages to our Python package-level documentation? The pages tha
8282

8383
Let's take a look at the [raw version of that file from our `pypkgs-cookiecutter`](https://raw.githubusercontent.com/py-pkgs/py-pkgs-cookiecutter/main/%7B%7B%20cookiecutter.__package_slug%20%7D%7D/docs/index.md):
8484

85-
<img src="img/index-raw.png" width=300>
85+
<img src="../img/index-raw.png" width=300>
8686

8787
This results in a side bar on our webpage that looks like this:
8888

89-
<img src="img/original-index.png" width=700>
89+
<img src="../img/original-index.png" width=700>
9090

9191
Thus, to add new pages, we add them to the `toctree` list. They will then show up in that position in the rendered side bar.
9292

9393
What if we want headers in our side bar?
9494
To do this, we need to add multiple `toctree`'s and add a caption.
9595
Here's an example:
9696

97-
<img src="img/index-raw-headers.png" width=300>
97+
<img src="../img/index-raw-headers.png" width=300>
9898

9999
Which will result in this rendering:
100100

101-
<img src="img/rendered-index-headers.png" width=1000>
101+
<img src="../img/rendered-index-headers.png" width=1000>
102102

103103

104104
## Vignettes/tutorials
@@ -160,7 +160,7 @@ sphinx:
160160
### Sphinx themes
161161

162162
Sometimes you want to have a different theme for your project's docs.
163-
This is possible by changing `html_theme` in `doc.conf.py`.
163+
This is possible by changing `html_theme` in `doc.conf.py`.
164164
See the link below to view and read the docs for other Sphinx themes:
165165

166166
- Sphinx themes gallery: <https://sphinx-themes.org/>

0 commit comments

Comments
 (0)