# Formatting poetry on ghost

**URL:** <https://forum.ghost.org/t/formatting-poetry-on-ghost/51739>\
**Category:** Using Ghost\
**Created:** [October 17, 2024, 4:41pm UTC](https://forum.ghost.org/t/formatting-poetry-on-ghost/51739 "2024-10-17T16:41:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh3](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/josh3/32/32676_2.png) [@josh3](https://forum.ghost.org/u/josh3)\
**Post date:** [October 17, 2024, 4:41pm UTC](https://forum.ghost.org/t/formatting-poetry-on-ghost/51739/1 "2024-10-17T16:41:33Z")

</div>

Is there an equivalent of a poetry mode for ghost that keeps whitespace but NOT a code block?

For example, substack has this. Here’s am example of what works for me on substack:

[https://open.substack.com/pub/bitpunkfm/p/hear-the-barn-owl-screech](https://open.substack.com/pub/bitpunkfm/p/hear-the-barn-owl-screech)

On ghost I had to make it a code block, and while code can be beautiful, I feel it’s not appropriate for poetry:

> **[Wood Wide Web](https://zine.bitpunk.fm/wood-wide-web/)**
>
> Walk on the stomach
> of the forest floor,
> Look up the bone
> of the Douglas Fir,
> Hear the synapses of mushrooms in the sky,
> Smell the tears of 
> fallen cones,
> Lick the lungs of soft needles.
> But feel the ancient wood through 
> ...

---

<div class="post-metadata">

**Author:** ![Raki](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/raki/32/40808_2.png) [@Raki](https://forum.ghost.org/u/Raki)\
**Post date:** [October 17, 2024, 7:17pm UTC](https://forum.ghost.org/t/formatting-poetry-on-ghost/51739/2 "2024-10-17T19:17:29Z")

</div>

To preserve spaces, you can put the following code into **Ghost settings \> Code injection \> Site header** :

```auto
<style>
  p {
    white-space: pre;
  }
</style>

```

---

<div class="post-metadata">

**Author:** ![josh3](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/josh3/32/32676_2.png) [@josh3](https://forum.ghost.org/u/josh3)\
**Post date:** [October 18, 2024, 12:34am UTC](https://forum.ghost.org/t/formatting-poetry-on-ghost/51739/3 "2024-10-18T00:34:50Z")

</div>

Ok, cool. This is working, but I think I’ll just put it on the post header of each post than site wide. See any issues with that?

---

<div class="post-metadata">

**Author:** ![Raki](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/raki/32/40808_2.png) [@Raki](https://forum.ghost.org/u/Raki)\
**Post date:** [October 18, 2024, 12:54am UTC](https://forum.ghost.org/t/formatting-poetry-on-ghost/51739/4 "2024-10-18T00:54:15Z")

</div>

Of course, you can put it on the post header.

Or you can still place it in the site header, but limit its effect to posts only by using the following code

```auto
<style>
  .post-template p {
    white-space: pre;
  }
</style>

```
