When adding a local image (relative path) to the Python Docstring like this:
"""
# Test
.. image:: test.svg
"""
then the image should be shown in the generated documentation of this Python file.
Actual Behavior
No image is shown, although the HTML element is generated:
<img alt="" src="test.svg">
The network traffic (when hosted by pdoc3 --http) shows a 302 response with redirection to test.svg/ which then directly afterwards returns a 404 Not Found. The pdoc log states:
Remote images (using URL) work but local images do not, which is a shame when the idea is to put all documentation within the repository/code. I also tested different image formats like png and jpg, but this did not make a difference.
Steps to Reproduce
Create folder /tmp/pdoctest, within, create a subfolder pdt
In the subfolder, copy an image file, create an empty __init__.py and a test.py file
Paste the above docstring in the test.py file and save it. Make sure that the name of the image matches.
Run PYTHONPATH="/tmp/pdoctest" pdoc3 --http : pdt
In your browser, open http://localhost:8080/pdt/test.html
The heading "Test" should be visible but not the image
Additional info
pdoc version: 0.8.1
If you require further information, please let me know!
Expected Behavior
When adding a local image (relative path) to the Python Docstring like this:
then the image should be shown in the generated documentation of this Python file.
Actual Behavior
No image is shown, although the HTML element is generated:
The network traffic (when hosted by
pdoc3 --http
) shows a 302 response with redirection totest.svg/
which then directly afterwards returns a 404 Not Found. The pdoc log states:Remote images (using URL) work but local images do not, which is a shame when the idea is to put all documentation within the repository/code. I also tested different image formats like png and jpg, but this did not make a difference.
Steps to Reproduce
/tmp/pdoctest
, within, create a subfolderpdt
__init__.py
and atest.py
filetest.py
file and save it. Make sure that the name of the image matches.PYTHONPATH="/tmp/pdoctest" pdoc3 --http : pdt
http://localhost:8080/pdt/test.html
Additional info
If you require further information, please let me know!