My code card is not highlighting properly

  1. I am using the cloud hosted version of Ghost
  2. I have added prism 1.16
  3. the python code shown up in the preview page of my draft doesn’t show any highlights

for prism js you need to mention the language. Write as below and see what happens

//your code here

I did and in the preview that’s what I got.

It would help if you could explain exactly what you’ve done here so that someone is able to help you - without knowing what you’ve done and with no link to your site the only thing anyone can do is guess at possible problems.

Hi Kevin,

Thanks for reply.

  1. I have published the draft post so that everyone can see it.

  2. This is the admin view of the post where I created the code card

  3. This is the header and footer where I added the prism.js

In Site Header
<link rel="stylesheet" type="text/css" src=""/>

In Site Footer
<script type="text/javascript" src=""></script>

Python is not one of the default supported languages in Prism.js. You’ll need to link to the python language JS support file in addition to the core prism JS file.

Hi there,

I eventually figured out how to make it work via this article Easy Code Highlighting in Ghost with Prism

Thank you. I will close this.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.