Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignored EditURLs in @meta-block #168

Open
agdestein opened this issue Jul 19, 2024 · 4 comments
Open

Ignored EditURLs in @meta-block #168

agdestein opened this issue Jul 19, 2024 · 4 comments

Comments

@agdestein
Copy link

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 which redirects to this source file).

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
Copy link
Collaborator

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

@asinghvi17
Copy link
Collaborator

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

@avik-pal
Copy link
Member

We might have to parse all the meta blocks accumulate the edit links and insert a function like https://vitepress.dev/reference/default-theme-edit-link

@asinghvi17
Copy link
Collaborator

Ah I missed that part of the docs! That should be easy then - we already have that in each page.meta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants