-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
PrismJS does not load through Cloudflare #67
Comments
I currently have a only a smartphone available (on vacation) so I cannot investigate any further but at least your mentioned setup works for me (Cloudflare activated): https://www.peleke.de/ghost-1-0-aktualisierung-bei-uberspace/ |
Interesting, I have caching set to standard and AutoMinify for JS, CSS, and HTML. Those are the only settings in CF that I would expect to change behavior but they also seem like normal settings, |
So today I checked on mobile and it works there. Still does not seem to work in a browser. |
Hi @tmsteen to help you better. can you share the url of your page |
On this page it does NOT seem to work: https://ratil.life/sans-holiday-hack-2017/ Seems like it may work whenever Cloudflare does not have the cached version. |
Hi @tmsteen I think the problem is because you are not adding the code syntax — please read the documentation — here you have all the languages that supports prism |
I do not think it is the syntax I am using as it all displays correctly if I bypass Cloudflare. Here is one of the examples that gets a 404: /hack-the-box-marai/components/prism-bash.min.js/: 2 Time(s) |
I think I figured it out. Cloudflare has a Beta RocketLoader feature that appears to break some JS. Might be cool to add support for this. Here are the details from Cloudflare if you are interested. What does Rocket Loader do? Rocket Loader improves page load times by: Decreasing the number of network requests by bundling JavaScript files, even third party resources, to avoid slowing down page rendering Rocket Loader is considered Beta because it’s an experimental feature that modifies the loading and execution flow of Javascript. While efforts are taken to increase Rocket Loader’s compatibility with third-party Javascripts, not all scripts work with this feature. Issues with Rocket Loader affect only a small percentage of customers. |
This is most likely an issue on my end but I was curious if you had seen it anywhere else.
With Cloudflare active, none of the code syntax highlighting works. There is the grey block of code, but no line numbers or highlighting. If I play Cloudflare in Development (pass through) mode, then I get the highlighting back. My local NGINX logs show the 404s for the PrismJS files.
Any ideas?
Ghost: 1.20.3
Mapache: 2.1.3
The text was updated successfully, but these errors were encountered: