# Getting raw content

**URL:** <https://zola.discourse.group/t/getting-raw-content/28>\
**Category:** Support\
**Created:** [December 12, 2018, 4:10pm UTC](https://zola.discourse.group/t/getting-raw-content/28 "2018-12-12T16:10:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![batisteo](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/batisteo/32/12_2.png) [@batisteo](https://zola.discourse.group/u/batisteo)\
**Post date:** [December 12, 2018, 4:10pm UTC](https://zola.discourse.group/t/getting-raw-content/28/1 "2018-12-12T16:10:07Z")

</div>

In a template, it is obviously possible to get the content of a page in HTML with `{{ page.content }}`. But in my RSS feed, I would like to have the raw markdown content, as it was written.

Is it somehow possible?

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 12, 2018, 6:09pm UTC](https://zola.discourse.group/t/getting-raw-content/28/2 "2018-12-12T18:09:36Z")

</div>

Currently no, that would pretty much double the amount of serialization we have to do for the template engine and would make Zola almost twice slower and use more memory 😕

---

<div class="post-metadata">

**Author:** ![remexre](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/remexre/32/15_2.png) [@remexre](https://zola.discourse.group/u/remexre)\
**Post date:** [December 21, 2018, 8:47am UTC](https://zola.discourse.group/t/getting-raw-content/28/3 "2018-12-21T08:47:20Z")

</div>

If you’re fine with using a forked version, [implemented here](https://github.com/remexre/zola). I’d really like to upstream this; in my case, I need it for doing [slides](https://github.com/remexre/remexre.github.io/blob/slides/templates/slides.html#L21) with reveal.js.

It’d also work for me to have a front-matter attribute, e.g. `content_is_raw = true`, that puts `page.raw_content` into `SerializingPage` instead; would a PR to do that be accepted?

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 21, 2018, 4:52pm UTC](https://zola.discourse.group/t/getting-raw-content/28/4 "2018-12-21T16:52:59Z")

</div>

Someone is currently having a look at changing the serialization in Tera: [https://github.com/Keats/tera/issues/364](https://github.com/Keats/tera/issues/364)

If this pans out, then we won’t need special options!

---

<div class="post-metadata">

**Author:** ![remexre](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/remexre/32/15_2.png) [@remexre](https://zola.discourse.group/u/remexre)\
**Post date:** [December 21, 2018, 5:05pm UTC](https://zola.discourse.group/t/getting-raw-content/28/5 "2018-12-21T17:05:41Z")

</div>

Sweet, I’ll keep an eye on that!

---

<div class="post-metadata">

**Author:** ![clemsos](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/clemsos/32/1397_2.png) [@clemsos](https://zola.discourse.group/u/clemsos)\
**Post date:** [January 23, 2025, 10:21am UTC](https://zola.discourse.group/t/getting-raw-content/28/6 "2025-01-23T10:21:15Z")

</div>

Hello, is there a way to access `page.raw_content` from the layout ?

I need to use the raw mardown to generate slides with sth like revealjs

Thank you !

---

<div class="post-metadata">

**Author:** ![clemsos](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/clemsos/32/1397_2.png) [@clemsos](https://zola.discourse.group/u/clemsos)\
**Post date:** [January 23, 2025, 10:48am UTC](https://zola.discourse.group/t/getting-raw-content/28/7 "2025-01-23T10:48:27Z")

</div>

My current workaround is:

```auto
<div>
      {% set raw_content = load_data(path=page.relative_path) %}
      {% set data = raw_content | split(pat='---') %}
      {% set frontmatter = '---' ~ data[1] ~ '---' %}
      {% set raw_markdown = raw_content | replace(from=frontmatter, to='') %}
</div>

{{ raw_markdown }}

```

but maybe it will be easier to just get directly the mardkown ?
