Skip to content

Conversation

@RunDevelopment
Copy link
Member

Per suggestion by @foxycode, I added an example for the usage of Prism with CDNs.

@foxycode
Copy link

@RunDevelopment There is still missing CSS I needed to add.

Also, I believe cdnjs.cloudflare.com is your official mirror, isn't it? It would be nice to add concrete example.

@RunDevelopment
Copy link
Member Author

There is still missing CSS

Do we even need to add this? It's dead simple to change the CSS link and many people use custom CSS.
So do we really need this? Just asking, if you think it is then I'll add it.

I believe cdnjs.cloudflare.com is your official mirror

We also support jsDelivr apparently.

It would be nice to add a concrete example.

Prism is available on quite a few CDNs, so it feels like we would disproportionally promote a single provider. Maybe a list of CDNs would also work?

@foxycode
Copy link

foxycode commented Jun 1, 2019

@RunDevelopment I believe it is needed. Or people may ask as I did why it isn't working. You can always choose not to include CSS and use your own, but it takes work to figure out why you don't see code colors and how to fix it.

CDN list would be nice. Problem is with file naming on different CDN's. You are referring prism-core.js in your example, but there is no such file on cloudflare, it is named differently.

What I simply want is, that with zero knowledge about prism I can open your page, copy fully functional code without more googling to my page and it will work. Otherwise, you may discourage not so experienced users and they will go try another plugin.

@RunDevelopment
Copy link
Member Author

What I simply want is, that with zero knowledge about prism I can open your page, copy fully functional code without more googling to my page and it will work.

That's a really good point. Will do.

You are referring prism-core.js in your example, but there is no such file on cloudflare.

There is, don't worry.

@foxycode
Copy link

foxycode commented Jun 1, 2019

@RunDevelopment I see. So I should include prism-core.js when using autoloader I suppose.

Also, it would be good to link min files in your example when using CDN.

Many thanks for your effort.

@mAAdhaTTah mAAdhaTTah merged commit 922ec55 into PrismJS:master Jun 30, 2019
@RunDevelopment RunDevelopment deleted the cdn-example branch June 30, 2019 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants