as of lately, I get an error when running Literate + Documenter locally. The macro @__BINDER_ROOT_URL__ is iterpreted as <unknown>, which seems to throw an error in the latest Documenter. As a MWE, I can just run the Literate.jl documentation locally:
Literate.jl % julia --project=docs docs/make.jl
[ Info: generating markdown page from `~/Desktop/Literate.jl/examples/example.jl`
[ Info: writing result to `~/Desktop/Literate.jl/docs/src/generated/example.md`
[ Info: generating notebook from `~/Desktop/Literate.jl/examples/example.jl`
[ Info: executing notebook `example.ipynb`
[ Info: writing result to `~/Desktop/Literate.jl/docs/src/generated/example.ipynb`
[ Info: generating plain script file from `~/Desktop/Literate.jl/examples/example.jl`
[ Info: writing result to `~/Desktop/Literate.jl/docs/src/generated/example.jl`
[ Info: generating markdown page from `~/Desktop/Literate.jl/docs/src/outputformats.jl`
[ Info: writing result to `~/Desktop/Literate.jl/docs/src/generated/name.md`
[ Info: generating notebook from `~/Desktop/Literate.jl/docs/src/outputformats.jl`
[ Info: executing notebook `notebook.ipynb`
[ Info: writing result to `~/Desktop/Literate.jl/docs/src/generated/notebook.ipynb`
[ Info: generating plain script file from `~/Desktop/Literate.jl/docs/src/outputformats.jl`
[ Info: writing result to `~/Desktop/Literate.jl/docs/src/generated/outputformats.jl`
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
┌ Error: invalid local link/image: file does not exist in src/generated/example.md
│ link =
│ @ast MarkdownAST.Link("<unknown>/generated/example.ipynb", "") do
│ MarkdownAST.Image("https://mybinder.org/badge_logo.svg", "") do
│ MarkdownAST.Text("")
│ end
│ end
│
└ @ Documenter ~/.julia/packages/Documenter/qoyeC/src/utilities/utilities.jl:44
┌ Error: invalid local link/image: file does not exist in src/generated/example.md
│ link =
│ @ast MarkdownAST.Link("<unknown>/generated/example.ipynb", "") do
│ MarkdownAST.Image("https://img.shields.io/badge/show-nbviewer-579ACA.svg", "") do
│ MarkdownAST.Text("")
│ end
│ end
│
└ @ Documenter ~/.julia/packages/Documenter/qoyeC/src/utilities/utilities.jl:44
┌ Error: invalid local link/image: file does not exist in src/generated/example.md
│ link =
│ @ast MarkdownAST.Link("<unknown>/examples/example.jl", "") do
│ MarkdownAST.Code("example.jl")
│ end
│
└ @ Documenter ~/.julia/packages/Documenter/qoyeC/src/utilities/utilities.jl:44
┌ Error: invalid local link/image: file does not exist in src/generated/example.md
│ link =
│ @ast MarkdownAST.Link("<unknown>/generated/example.ipynb", "") do
│ MarkdownAST.Code("example.ipynb")
│ end
│
└ @ Documenter ~/.julia/packages/Documenter/qoyeC/src/utilities/utilities.jl:44
┌ Error: invalid local link/image: file does not exist in src/generated/example.md
│ link =
│ @ast MarkdownAST.Link("<unknown>/generated/example.ipynb", "") do
│ MarkdownAST.Code("example.ipynb")
│ end
│
└ @ Documenter ~/.julia/packages/Documenter/qoyeC/src/utilities/utilities.jl:44
┌ Error: invalid local link/image: file does not exist in src/generated/example.md
│ link =
│ @ast MarkdownAST.Link("<unknown>/examples/example.jl", "") do
│ MarkdownAST.Text("source file")
│ end
│
└ @ Documenter ~/.julia/packages/Documenter/qoyeC/src/utilities/utilities.jl:44
When I set the binder URL to an actual URL:
Literate.markdown(file_path, OUTPUT; binder_root_url="https://mybinder.org/v2/gh/")
things work. But of course, it would be great if, locally, a dummy URL could be inserted that does not throw an error, while being able to use the automated insertion on GitHub.
Hi,
as of lately, I get an error when running Literate + Documenter locally. The macro
@__BINDER_ROOT_URL__
is iterpreted as<unknown>
, which seems to throw an error in the latest Documenter. As a MWE, I can just run the Literate.jl documentation locally:When I set the binder URL to an actual URL:
Literate.markdown(file_path, OUTPUT; binder_root_url="https://mybinder.org/v2/gh/")
things work. But of course, it would be great if, locally, a dummy URL could be inserted that does not throw an error, while being able to use the automated insertion on GitHub.Would it maybe be a fix to replace
<unknown>
with a URL in this line? https://github.com/fredrikekre/Literate.jl/blob/5c9beaa7f56bf3fe6d75a053799c73b0caec94ce/src/Literate.jl#L219-L220Thanks for looking into this!