# Syntax highlighting with the code slice

**URL:** https://community.prismic.io/t/syntax-highlighting-with-the-code-slice/3383
**Category:** Developing with Prismic
**Tags:** gatsby
**Created:** [December 29, 2020, 9:01pm UTC](https://community.prismic.io/t/syntax-highlighting-with-the-code-slice/3383 "2020-12-29T21:01:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![iqbal125](https://avatars.discourse-cdn.com/v4/letter/i/b487fb/32.png) [@iqbal125](https://community.prismic.io/u/iqbal125)
#### Post date: [December 29, 2020, 9:01pm UTC](https://community.prismic.io/t/syntax-highlighting-with-the-code-slice/3383/1 "2020-12-29T21:01:10Z")

</div>

So Im followng this tutorial on creating documentation with prismic

> **[Tips on content modeling in API CMS](https://prismic.io/concepts/content-modeling)**
>
> Guides and best practices for a good CMS UX: basic concepts and practical examples

and have got it working, but Im not getting any syntax highlighting or formatting for code snippets

![image](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/f/f0b9376d3cbb8c40ae03ff0324a4a7efcb18c06e.png)

What is the standard way to do this?

---

<div class="post-metadata">

### Author: ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)
#### Post date: [December 30, 2020, 12:36pm UTC](https://community.prismic.io/t/syntax-highlighting-with-the-code-slice/3383/2 "2020-12-30T12:36:02Z")

</div>

Hi Mohammad,

The guide you followed is only for the content modelling side on Prismic for your code snippets. You will still need to configure the styling on your frontend side in whatever technology you are using. The easiest way to do this is to use a code styling library like [https://highlightjs.org/](https://highlightjs.org/) or [https://prismjs.com/](https://prismjs.com/) .

This thread shows how a user did this in Gatsby

> [@Trouble formating \<pre\> using Prism in Gatsby](https://community.prismic.io/t/trouble-formating-pre-using-prism-in-gatsby/1313/6):
>
> Ok I’m guessing I should create a container slice field (e.g. body) that could then contain repeatable Rich Text description as well as code slices.

Thanks.

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)
#### Post date: [December 31, 2020, 12:36pm UTC](https://community.prismic.io/t/syntax-highlighting-with-the-code-slice/3383/4 "2020-12-31T12:36:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)
#### Post date: [December 9, 2021, 4:57pm UTC](https://community.prismic.io/t/syntax-highlighting-with-the-code-slice/3383/5 "2021-12-09T16:57:37Z")

</div>


