JuliaDocs / Documenter.jl

A documentation generator for Julia.
https://documenter.juliadocs.org
MIT License
807 stars 477 forks source link

./ is relative, not an alias for src #2559

Open arlowhite opened 3 weeks ago

arlowhite commented 3 weeks ago

The Showcase Images section states:

Alternatively, use ./ to begin a path relative to the src of the documents, e.g., ./assets/logo.png.

However, this is not actually a feature.

./assets/logo.png and assets/logo.png both work in this file because it's within docs/src/

But if you try ./ in a subdirectory's markdown file, such as docs/src/man/doctests.md

![Enter a descriptive caption for the image](./assets/logo.png)

You get this error:

┌ Error: invalid local link/image: file does not exist in src\man\doctests.md
│   link =
│    @ast MarkdownAST.Image("./assets/logo.png", "") do
│      MarkdownAST.Text("Enter a descriptive caption for the image")
│    end
arlowhite commented 3 weeks ago

Also, I think it would be a bit weird if ./ were special since it is a typical relative path. Maybe better to use / or ~?