You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered the following problem with scripts and images where the relative link that is used for both differs:
If I include an image on a subpage such as Menu 1 in the example provided by the JuDoc.jl documentation, i.e.:
The image link on the webpage is set to pub/assets/infra/rndimg.jpg. To make the image load on the webpage I need to copy the assets folder or at least the relevant images to src/pages/.
This behaviour differs from doing this on the index.md page, where the link will point to assets/infra/rndimg.jpg and the image will be correctly displayed.
Now comes my gripe with this behaviour:
The behaviour of scripts is the same also on "subpages" below index.md, as they will be included from the assets/scripts/ folder (e.g. \input{code:julia}{script2.jl}). However, when using \input{plot}{script2.jl} the image link points to pub/assets/scripts/output, when used on "subpages". Consequently, the image will not load and it has to be manually copied from where it is generated assets/scripts/output/ to where it is supposed to be, pub/assets/scripts/output/.
I think there are two solutions to make this behaviour consistent:
Either scripts used as input on "subpages" need to be imported from pub/assets/scripts/ or using \input{plot}{script2.jl} needs to set the link correctly to assets/scripts/output.
The text was updated successfully, but these errors were encountered:
Invarianz
changed the title
Wrong asset folder link for images
Inconsistent asset folder link for scripts compared to images
May 12, 2019
Hello again! and thanks a lot for reporting issues,
For the firs thing, you're right that if you copy the example from index.md into menu1.md the image does not load, the simple fix here is to just use src=/assets/... instead of src=assets/... so that we properly refer to the root.
Putting the images in src/pages/... will also work but I think the approach above makes more sense.
With respect to input, I made the same mistake of using assets/... instead of /assets/.... This is now fixed. Both this fix and the one for #151 will be in 0.1.3.
So if you now write
\input{plot}{script2.jl}
in menu1.md in the example without copying anything, you will get the expected plot.
I encountered the following problem with scripts and images where the relative link that is used for both differs:
If I include an image on a subpage such as Menu 1 in the example provided by the JuDoc.jl documentation, i.e.:
The image link on the webpage is set to
pub/assets/infra/rndimg.jpg
. To make the image load on the webpage I need to copy theassets
folder or at least the relevant images tosrc/pages/
.This behaviour differs from doing this on the
index.md
page, where the link will point toassets/infra/rndimg.jpg
and the image will be correctly displayed.Now comes my gripe with this behaviour:
The behaviour of scripts is the same also on "subpages" below index.md, as they will be included from the
assets/scripts/
folder (e.g.\input{code:julia}{script2.jl})
. However, when using\input{plot}{script2.jl}
the image link points topub/assets/scripts/output
, when used on "subpages". Consequently, the image will not load and it has to be manually copied from where it is generatedassets/scripts/output/
to where it is supposed to be,pub/assets/scripts/output/
.I think there are two solutions to make this behaviour consistent:
Either scripts used as input on "subpages" need to be imported from
pub/assets/scripts/
or using\input{plot}{script2.jl}
needs to set the link correctly toassets/scripts/output
.The text was updated successfully, but these errors were encountered: