EO-College / cubes-and-clouds

This is the official repository for the online course 'Cubes & Clouds'
https://eo-college.org/courses/cubes-and-clouds/
Creative Commons Attribution 4.0 International
32 stars 14 forks source link

Syntax to include images in the MOOC #48

Closed annefou closed 4 weeks ago

annefou commented 2 months ago

The current syntax used to include figures/images is:

![Datacube Economy](https://github.com/EO-College/cubes-and-clouds/blob/main/lectures/1.2_data_cube/assets/datacubes_economy.png "Example Data Cube Economy")

However, images do not render properly with Jupyter Book using this method. Would it make sense to use:

![Datacube Economy](https://raw.githubusercontent.com/EO-College/cubes-and-clouds/main/lectures/1.2_data_cube/assets/datacubes_economy.png "Example Data Cube Economy")

instead? Would this render properly on the EO-College platform?

With Jupyter Book, we also have the option to use the following MyST syntax:

  ```{figure} https://raw.githubusercontent.com/EO-College/cubes-and-clouds/main/lectures/1.2_data_cube/assets/datacubes_economy.png
  ---
  height: 350px
  name: datacube-economy
  ---
  Example Data Cube Economy


However, we may want to avoid this approach to keep things simple. 
clausmichele commented 2 months ago

Hi Anne, in EO College everything is ported to WordPress, so it doesn't really matter. Here on GitHub though, the drawback of using raw links would be that if we ever change an image, we would also need to change the corresponding raw link. Not a big deal, but we need to be aware of it. Anyway, if it's necessary to have the figures rendered in Jupyter Books, I would be in favor of switching to the second type of syntax, which is still Markdown.

annefou commented 1 month ago

From the discussion we had, I think:

![Datacube Economy](https://raw.githubusercontent.com/EO-College/cubes-and-clouds/main/lectures/1.2_data_cube/assets/datacubes_economy.png "Example Data Cube Economy")

is a good approach. Can you confirm?

clausmichele commented 4 weeks ago

Hi @annefou, yes I confirm!

annefou commented 4 weeks ago

Great. I will make a PR to use this approach. Thank you.