LuxDL / DocumenterVitepress.jl

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

Can't find assets directory? #65

Closed cormullion closed 6 months ago

cormullion commented 7 months ago

My attempt at a build is erroring because it can't find an assets directory:

┌ Warning: DocumenterVitepress: no assets directory found.
└ @ DocumenterVitepress ~/.julia/packages/DocumenterVitepress/SZzuS/src/writer.jl:228

...

build error:
RollupError: Could not resolve "./assets/figures/f.gif" from "build/.documenter/basics.md"

although it's unchanged from the usual Documenter.jl structure:

docs
└───src
    └───basics.md
    └───index.md
    └───.vitepress
        └───config.mts
    └───assets
        └───logo.png
        └───logo.svg
        └───styles.css
        └───figures
            └───f.gif
    └───reference
        └───api.md
        └───functionindex.md

Is there some configuration option I've overlooked?

lazarusA commented 7 months ago

Repo? Branch?

asinghvi17 commented 7 months ago

ah, the issue here is that we move the files in the src/assets folder into .documenter/public during the build step. I can walk that change back and only copy files matching logo.* and favicon into public instead.

cormullion commented 7 months ago

Yes, I'm using Markdown links such as ![ alt text](assets/figures/figure.svg) (Documenter-style). I'm hoping that I wouldn't have to rewrite them all.

lazarusA commented 7 months ago

I see. Yes, I have the same issue. Going from assets to public (replacing/ renaming) its confusing. Maybe it should be better to keep assets as assets :D, and create the extra folder public in docs? and then copy both? public is mandatory in vitepress ....

asinghvi17 commented 7 months ago

@cormullion could you try your build on the latest master?

cormullion commented 6 months ago

Works perfectly!

Screenshot 2024-03-08 at 17 43 16
asinghvi17 commented 6 months ago

Perfect! That package looks really cool, by the way :)