# Code blocks

**URL:** <https://discourse.gohugo.io/t/code-blocks/391>\
**Category:** support\
**Created:** [November 28, 2014, 5:54pm UTC](https://discourse.gohugo.io/t/code-blocks/391 "2014-11-28T17:54:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![doanerock](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@doanerock](https://discourse.gohugo.io/u/doanerock)\
**Post date:** [November 28, 2014, 5:54pm UTC](https://discourse.gohugo.io/t/code-blocks/391/1 "2014-11-28T17:54:00Z")

</div>

I am looking for a way to make code clearly show up clearly and not wrap when it has very long lines like they so nicely do on stackoverflow.

Thanks

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 28, 2014, 6:08pm UTC](https://discourse.gohugo.io/t/code-blocks/391/2 "2014-11-28T18:08:47Z")

</div>

Then you should test out Hugo’s two ways of doing it and see if that is to your liking.

---

<div class="post-metadata">

**Author:** ![doanerock](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@doanerock](https://discourse.gohugo.io/u/doanerock)\
**Post date:** [November 28, 2014, 6:27pm UTC](https://discourse.gohugo.io/t/code-blocks/391/3 "2014-11-28T18:27:43Z")

</div>

I could not find any ways for making code blocks in hugo. Can you include a link to an example of how to use hugo’s two different ways of making code blocks.

Thanks

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 28, 2014, 6:37pm UTC](https://discourse.gohugo.io/t/code-blocks/391/4 "2014-11-28T18:37:50Z")

</div>

> **[Syntax Highlighting](http://gohugo.io/content-management/syntax-highlighting/)**
>
> Hugo comes with reallly fast syntax highlighting from Chroma.

The “other” method could be better described - but is basically GitHub styled code fences (Google it) styled client side with a Javascript lib.

The server side highlight shortcode has been made slightly easier to use in the latest code base (0.13-DEV). Serverside highlighting makes the site gen a little bit slower, but the code looks fantastic.

---

<div class="post-metadata">

**Author:** ![doanerock](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@doanerock](https://discourse.gohugo.io/u/doanerock)\
**Post date:** [November 28, 2014, 10:18pm UTC](https://discourse.gohugo.io/t/code-blocks/391/5 "2014-11-28T22:18:10Z")

</div>

Thanks for the tip, I will give server side highlighting a try.
