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

copy assets folder just before creating .documenter and final_site #159

Closed
lazarusA opened this issue Jun 22, 2024 · 5 comments
Closed

copy assets folder just before creating .documenter and final_site #159

lazarusA opened this issue Jun 22, 2024 · 5 comments

Comments

@lazarusA
Copy link
Collaborator

lazarusA commented Jun 22, 2024

In the current implementation it looks like we copy the assets folders immediately. However, because I want to save some files coming from doctest blocks first, the build fails later, because those files were never copied, because they didnt' exist yet.

Where should I be looking? @asinghvi17

@asinghvi17
Copy link
Collaborator

asinghvi17 commented Jun 22, 2024

That shouldn't be the case...Markdown expansion (including explicit saving and doctests) is done in docs/build and only then are files copied to docs/build/.documenter. This is to say that all Documenter files are executed under cd(first(splitdir(page.path))).

Are you saving directly to assets or something? And are you sure doctests are being run during the build?

@lazarusA
Copy link
Collaborator Author

lazarusA commented Jun 22, 2024

Working here: https://github.com/rafaqz/Rasters.jl/tree/la/new_vite_docs

in a .jl file from the. I have

savefig(a, "src/assets/api/mosaic_example_africa.png")
nothing
# output

Individual continents

![arica](assets/api/mosaic_example_africa.png)

which saves the output into docs/src/assets/api/. It does save things correctly there, but, then they are not copied to .documenter.

I tried several ways of saving things (like /assets/api/ directly), but none did work. Hints?

@asinghvi17
Copy link
Collaborator

try using public instead of assets maybe?

@lazarusA
Copy link
Collaborator Author

lazarusA commented Jun 22, 2024

thanks for the hint!

when doing doctests we need to save the output into docs/build/, namely, savefig(a, "build/my_ouput.png")

@asinghvi17
Copy link
Collaborator

Huh, that's a bit strange. Possibly worth an issue on Documenter.jl, since doctests should be executed in the workdir.

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

2 participants