Course presentation & course image

Do you know how to fix the pb with the image on the FUN page, when including Intro — Scikit-learn course ?

We used <div class="external-resource" data-hide="h1, .topbar, .prev-next-bottom, .footer, .site-navigation, .headerlink" data-url="https://inria.github.io/scikit-learn-mooc/index.html"></div>

Problem is the relative link to the image : “figures/mooc_computer.jpg”. You should replace by the complete path

@LoicEsteve see https://github.com/INRIA/scikit-learn-mooc/blob/master/jupyter-book/index.md the image path is wrong.

Sorry I assume this was a FUN-only thing.

Not sure how this works in FUN but in principle using ?content_only at the end of the page you are including should be enough. Look at the difference between https://inria.github.io/scikit-learn-mooc/index.html and https://inria.github.io/scikit-learn-mooc/index.html?content_only.

Note: in principle this should be done for all the FUN page which include a HTML page from the JupyterBook, see All pages referring to our JupyterBook (inria.github.io/...) should have `?content_only` at the end for more details.

For more context, this section should be removed since there is no point mentioning the MOOC in a MOOC page.

For the record I put the fun:needs-action tag, I have not found a way to track tags history yet but maybe I missed something …

ok @LoicEsteve, it’s corrected. I modified the link and add data-hide : .remove-from-content-only
Should I delete also the Welcome frame ?

Probably I am missing something but can you not use https://inria.github.io/scikit-learn-mooc/index.html?content_only as the URL and not have any logic on the FUN side?

No because we are including the raw page using javascript (not an iframe, we fetch the full html content strip the javascript for security reasons) so the content_only javascript is not executed.

:cry: things are always more complicated than what I hope …

So that means that nothing is using the ?content_only thing anymore? Or are some FUN pages using javascript and some other pages using iframe?

In any case, I’d rather add a class in our HTML rather than requiring you to have additional logic on the FUN side.

Désolée, je passe en français, c’est plus rapide.
Du coup, j’ai vérifié les autres pages affichées dans FUN depuis le JupyterBook et il y a un None qui apparait à la fin des pages de type “Module overview” et “Main take-away” (ex https://inria.github.io/scikit-learn-mooc/overfit/overfit_take_away.html?content_only et du coup dans FUN https://lms.fun-mooc.fr/courses/course-v1:inria+41026+session01/jump_to_id/a3dcd23a10fa4146a7a1e978fc34bce4).
Idem Glossary et Aknowledgements

J’imagine qu’il y a de la logique problématique dans le javascript qui rajoute le None à la fin … et donc qui le fait sur toutes les pages.

A class is perfect. In anycase we have to manually add the page like so :

<div class="external-content" 
     data-url="https://inria.github.io/scikit-learn-mooc/index.html?content_only" 
     data-hide=".remove-from-content-only, [...]"></div>

And that’s it.

content_only is used in iframes for correction notebooks.

OK thanks! This makes a bit more sense.

data-url=“https://inria.github.io/scikit-learn-mooc/index.html?content_only

I am guessing there is no point in adding ?content_only in the URL since the javascript is stripped? Maybe this is even what adds the final None (random-guess no idea actually …)?

The None is coming from Jupyterbook even witout ?content_only (see bottom left)

Now that’s interesting, need to look into it in more details!

Long story short: I am going to bet on a pydata-sphinx-theme 0.6.2 release which was released 9 hours ago … https://pypi.org/project/pydata-sphinx-theme/.

I’ll pin the version in our CI this should be fixed in 5-10 minutes :crossed_fingers:

Seems to be fixed: https://inria.github.io/scikit-learn-mooc/index.html

I also opened a pydata-sphinx-theme issue about this: https://github.com/pydata/pydata-sphinx-theme/issues/403.

It does seem like a bug so you can give yourself a pat on the back since you helped to make the scientific Python ecosystem better :smile:.

Not everywhere, for example : https://inria.github.io/scikit-learn-mooc/overfit/overfit_take_away.html?content_only