- I am using the cloud hosted version of Ghost
- I have added prism 1.16
- 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
```python
//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.
-
I have published the draft post so that everyone can see it. https://djangoforhumans.com/generic-relation-django-rest-framework/
-
This is the admin view of the post where I created the code card
-
This is the header and footer where I added the prism.js
In Site Header
<link rel="stylesheet" type="text/css" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/themes/prism.min.css"/>
In Site Footer
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/prism.min.js"></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.