typedoc icon indicating copy to clipboard operation
typedoc copied to clipboard

Cannot link local files/images via markdown image links

Open WHenderson opened this issue 2 years ago • 2 comments

Search terms

Markdown, Local files, Relative path

Expected Behavior

When encountering markdown such as

![debounce](diagrams/debounce.drawio.svg)

Typedoc should link the referenced file relative to the source of the markdown being parsed

Actual Behavior

TypeDoc will insert the expected <img> tag, but does not adjust the href and does not include the linked file in the assets folder. This results in broken images.

Steps to reproduce the bug

  1. Create a typedoc project
  2. Add an image to the project
  3. Add a markdown image tag ![image name](local/image/reference)
  4. Compile with typedoc
  5. Note that the image is broken

Having traced through the code, it would also be helpful if the MarkdownEvent was given context information such that extensions could understand what the given markdown relates to and what file it was sourced from.

WHenderson avatar Mar 29 '22 02:03 WHenderson

Ran into this today as well except I'm trying to link to other markdown files by their relative path.

stuft2 avatar Jun 13 '23 04:06 stuft2

Is there some workaround available? Only think I think of is to manually copy images to assets folder, don't know though if that's best way.

kwiniarski97 avatar Oct 27 '23 07:10 kwiniarski97