LuxDL / DocumenterVitepress.jl

Documentation with Documenter.jl and VitePress
https://luxdl.github.io/DocumenterVitepress.jl/
MIT License
71 stars 11 forks source link

Ignored `EditURL`s in `@meta`-block #168

Open agdestein opened 2 months ago

agdestein commented 2 months ago

Literate.jl automatically converts .jl files to Documenter .md files. This adds something like the following block in top of the .md file:

```@meta
EditURL = "../../../examples/script_source_file.jl"

When the files are then built with normal Documenter, clicking the `Edit this page` redirects to `script_source_file.jl` instead of `generated_markdown_file_which_does_not_exist.md` (this can be tried on the link on [this page](https://fredrikekre.github.io/Literate.jl/v2/generated/example/) which redirects to [this source file](https://github.com/fredrikekre/Literate.jl/blob/master/examples/example.jl)).

With DocumenterVitepress, this `EditURL` seems to be ignored, see for example the `Edit this page on GitHub` button at the bottom of the Literated page <https://lux.csail.mit.edu/stable/tutorials/beginner/1_Basics> which should point to <https://github.com/LuxDL/Lux.jl/blob/main/examples/Basics/main.jl>.
asinghvi17 commented 2 months ago

Ah that's the problem I'm getting. Should be fixable, I don't think DV looks at page.meta yet.

asinghvi17 commented 2 months ago

It looks like Vitepress doesn't allow per-page editURL config, so the best option here might be to do it ourselves...