NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
458 stars 102 forks source link

pydocmd and images in README #94

Open claverru opened 4 years ago

claverru commented 4 years ago

Hello @NiklasRosenstein,

I like this library a lot, I find it so useful. Though, I would like to be able to include images in both README.md and index.md. Let me explain:

PROBLEM

When generating the doc's index.md, it takes whatever is in sources as relative path from there. However README.md, to show images properly, has to take images path as sources/image.png.

Because of that, I have to choose whether to show my images at the served docs, or at the README.md, imagine, in a git repository.

UGLY WORKAROUND

Specify docs_dir: ., which has a big issue: In result, inside the _build folder it is copied everything what was in _build folder before.

POSSIBLE SOLUTIONS

  1. Even if chosen docs_dir: sources , take what it is inside as sources/img.png instead img.png
  2. Command aditional_search_paths looks for sources too, not only for python module.
NiklasRosenstein commented 4 years ago

Hey @claverru

Thanks for your feedback. The little time I take to invest into this library I am going to invest it into v3 on the develop branch. I think it can be tackled without workarounds by actually searching for image references in the markdown code and copying them to the correct location (and/or rewriting the image reference).