Skip to content

Conversation

@eemilhaa
Copy link
Contributor

@eemilhaa eemilhaa commented Jun 26, 2025

Context: #79

This adds reusable lukuohje.Rmd & uses it for GP001 as an example.

In general, bringing in rmarkdown from other files works, but images seem to be an issue. If we keep the shared images in a centralized location (i.e. outside the course directory that gets built with bookdown) the images are not included in the build. A possible way to overcome this would be to copy images over as part of the build, but that of course adds more complexity.

@eemilhaa eemilhaa requested a review from JuhoErvasti June 26, 2025 13:54
@github-actions
Copy link
Contributor

Preview changes here.

@JuhoErvasti
Copy link
Contributor

@eemilhaa I'm on vacation so I'll get back reviewing this in August, but I happened to notice the GH notification so I'll just add in regards to the images is that one concern we've had with them is that they are the main thing that make this repo pretty big in disk size (which we've tried to minimize since GitHub does have some limits on repo sizes) and I think a solution which doesn't involve copying images would be preferred if possible.

One idea I remember having at some point is that maybe instead of copying we would somehow use direct links to the raw image content in the repo itself, something like https://raw.githubusercontent.com/GispoCoding/master-training-data/refs/heads/main/src/GR002/img/harjoitus_1/image1.png. And to keep things simpler from an editing point-of-view these would be replaced automatically (with a Python? script in the render-deploy workflow) so you could keep using the relative paths as is and render the documents locally but then there wouldn't be any duplication of images over to the pages branch. And I think then you could account for the shared images in the script.

But that's just an idea, do you think that would be a good/reliable approach? I guess it also adds its own complexity.

Anyway, I'll try to not look at this anymore until August, just wanted to quickly share the idea and to mention the repo size aspect.

@JuhoErvasti
Copy link
Contributor

@eemilhaa I think the PR itself looks good and this approach is a good idea. The image links are the only issue, I think. What do you think of the idea in my previous comment and how should we continue with this?

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

Successfully merging this pull request may close these issues.

3 participants