Currently, the gitlab CI only copies the slides/img folder to the public folder, which is required for deploying the slides a s gilab pages. If we wish to use images from exercises/extradoc within the slides, it is not possible to use them directly, as the exercises/extradoc folder is not copied to the public folder within the CI. See MR !299 (merged),
Edited
Designs
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
Related merge requests
1
When this merge request is accepted, this issue will be closed automatically.
For the slides in problem.md, we currently copy the image extradoc/exercise1_setup.png into slides/img to have access to it, although this means, that currently this image exists twice within the dumux-course repository.
One could also copy the folder exercises/extradoc/ into the public folder of the CI. However, by doing this one always has an inconsistency in paths to the images when building a single slide locally and when the CI build the slides. When including an image within a slide markdown file, for the CI the correct path to an image from extradoc/ would be e.g. <img style="float: right;" src="extradoc/exercise1_setup.png"> (as the relative path to the public directory of the CI) while for local building it would be <img style="float: right;" src="../exercises/extradoc/exercise1_setup.png"> (as the relative path to slides/).
Another possibility: move all images from exercises/extradoc/ to slides/img/ and give them representative and consistent names (naming is not consistent currently). This way, the slides can access all images, also while building in the CI. As the exercises are not required for building in the CI, the relative path to the images does not matter and can be chosen freely. Does this sound ok? @timok
yes, we can do it this way (have them in slides/img). For the exercises you can also create symlinks (or copies on Windows) via CMake (see how dune_symlink_to_source_tree does it).
Ok, great. I would prefer changing the paths in each exercise though. If I understand correctly, by generating symlinks via CMake, this requires a build step in between to actually generate them. This is not possible for READMEs which are inspected on the gitlab webpage, right? So all exercise README would be messed up when watching them on gitlab.
I don't think it should be a problem. For example dune-common has a symlink COPYING that links to LICENSE.md. And that can at least be cloned. You just create the symlink and commit it with git. You'd have to try if it works for the browser viewing.
I don't think it works with symlinks, the READMEs on gitlab don't display the images anymore but instead place a link that contains e.g. "../../slides/img/exercise_model_mri_denoise.gif" when opened.