New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert Slides from cdnjs.cloudflare.com
to JSDelivr CDN
#2513
Conversation
cdnjs.cloudflare.com
cdnjs.cloudflare.com
to JSDelivr CDN
@IceCodeNew this PR is currently incomplete and results in JS errors as all the paths, filenames, and SRIs are still based on CDNJS. You can view all the path/filename/SRI changes needed for JSDelivr at https://www.jsdelivr.com/package/npm/reveal.js Please can you fix the URIs and SRIs for the Reveal, and its plugins and themes, and then test it? Thanks |
Apologies for missing that, I will investigate it ASAP. |
This comment has been minimized.
This comment has been minimized.
4bda4b6
to
5f5e7b0
Compare
The reason you see a problem recently is probably because this PR had not been rebased to the latest upstream (As you just merged my another PR). |
@IceCodeNew the issues are mentioned here: #2513 (comment) , force pushing doesn't fix any of those issues If we change |
I did manually craft the complete URLs of the reveal plugin mentioned in this file to see whether the change is proper. Maybe there are some I missed in other files. |
Thanks for addressing this. I think the remaining change we need to make is that you are using the JSDelivr minify-on-demand feature to generate minified versions of the plugin files but JSDelivr advise not to use SRI on dynamically generated files: https://www.jsdelivr.com/using-sri-with-dynamic-files So let's remove the SRI from the plugins if we are going to use the dynamically generated minified files... |
Also, let's take this opportunity to update to Reveal 4.2: https://github.com/hakimel/reveal.js/releases |
It'd be nice if now the default Math typesetter could be MathJax 3, the same as we have in the rest of the theme |
Good suggestion, Rodri! Here's the reference on how to use Mathjax3 in Reveal 4.2+: https://revealjs.com/math/ And here's the place where the Reveal initialisation would need updating: https://github.com/wowchemy/wowchemy-hugo-themes/blob/d26f01d5d6c3f13b1daa629ba60bfc6a3e71b924/wowchemy/assets/js/wowchemy-slides.js#L10 We can change |
I would like to do those in separate PRs.
Thanks for pointing it out. I will check every change in this PR, as JSdelivr will show a warning on the dynamically generated minified files. Where the warning didn't sound, the change there stays the same. |
@IceCodeNew any update on the remaining changes?
|
The remaining changes are just done ;-) |
Signed-off-by: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com>
Signed-off-by: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com>
e3ff375
to
1c56a08
Compare
@IceCodeNew 谢谢 |
Signed-off-by: IceCodeNew 32576256+IceCodeNew@users.noreply.github.com
Purpose
This commit is meant to complete #2512, I managed to completely remove the needs of loading scripts from Cloudflare by these two changes.
Not sure the root of the problem, but when I was testing my site, the script failed to load from Cloudflare under some circumstance (the debug info shows that's the CORS problem).
That's basically why I am so actively hunting and eliminating the scripts that loaded from cdnjs.cloudflare.com. And I do think proposing such a change will not affect others in bad means.