LuxDL / DocumenterVitepress.jl

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

Issue with nested pages #37

Closed jeremiedb closed 7 months ago

jeremiedb commented 7 months ago

The docs build fails when nested pages are used:

pages = [
    "Quick start" => "quick-start.md",
    "Design" => "design.md",
    "Models" => "models.md",
    "API" => "API.md",
    "Tutorials" => [
        "Regression - Boston" => "tutorials/regression-boston.md",
        "Logistic - Titanic" => "tutorials/logistic-titanic.md",
        "Classification - IRIS" => "tutorials/classification-iris.md",
    ]
]

results in following error in CI:

Deploying: ✔
ERROR: LoadError: MethodError: no method matching pagelist2str(::Documenter.Document, ::Pair{String, Any})

Closest candidates are:
  pagelist2str(::Any, ::Pair{String, String})
   @ DocumenterVitepress ~/.julia/packages/DocumenterVitepress/IO55P/src/vitepress_config.jl:75
  pagelist2str(::Any, ::String)
   @ DocumenterVitepress ~/.julia/packages/DocumenterVitepress/IO55P/src/vitepress_config.jl:62
  pagelist2str(::Any, ::Pair{String, <:AbstractVector})
   @ DocumenterVitepress ~/.julia/packages/DocumenterVitepress/IO55P/src/vitepress_config.jl:81

However the following works fine:

pages = [
    "Quick start" => "quick-start.md",
    "Design" => "design.md",
    "Models" => "models.md",
    "API" => "API.md"
]

It looks like this may have been what was being adressed by https://github.com/LuxDL/DocumenterVitepress.jl/pull/35. However, the above CI example were run with [4710194d] + DocumenterVitepress v0.0.4. Maybe the previous fix wasn't part of the latest registered version?

Thanks for the great work, a very promising upgrade to docs format!

jeremiedb commented 7 months ago

For reference, here is the reference to the make.jl. Note that when building locally, it fails with the following:

[ Info: RenderDocument: rendering document.
[ Info: DocumenterVitepress: rendering MarkdownVitepress pages.
┌ Warning: DocumenterVitepress: no assets directory found.
└ @ DocumenterVitepress C:\Users\jerem\.julia\packages\DocumenterVitepress\IO55P\src\writer.jl:217

ERROR: LoadError: SystemError: opening file "C:\\Users\\jerem\\OneDrive\\Evovest\\NeuroTreeModels.jl\\docs\\build\\tutorials\\classification-iris.md": No such file or directory

I noticed that the build folder has some of docs src files directly under build while unders are under build/.documenter: image Not sure it's may relate to the package.json: "docs:dev": "vitepress dev build/.documenter"? As mentionned, the build is fine on CI (when nested pages are removed), but locally, the make.jl fails.

asinghvi17 commented 7 months ago

Should be fixed in v0.0.6