# Any way to exclude files/directories from liquid processing?

**URL:** <https://talk.jekyllrb.com/t/any-way-to-exclude-files-directories-from-liquid-processing/6282>\
**Category:** Help\
**Created:** [July 31, 2021, 3:10pm UTC](https://talk.jekyllrb.com/t/any-way-to-exclude-files-directories-from-liquid-processing/6282 "2021-07-31T15:10:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![qYjGM](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/qyjgm/32/3720_2.png) [@qYjGM](https://talk.jekyllrb.com/u/qYjGM)\
**Post date:** [July 31, 2021, 3:10pm UTC](https://talk.jekyllrb.com/t/any-way-to-exclude-files-directories-from-liquid-processing/6282/1 "2021-07-31T15:10:09Z")

</div>

I have some content in my markdown files that contains text resembling liquid syntax. This results in warnings at build time and text disappearing from the rendered documents.

At the moment I use the `{% raw %}{% endraw %}` syntax to stop this from happening but I’d rather not pollute my markdown with this ugliness.

Is there a way to make jekyll/liquid ignore liquid syntax in the entire markdown documents? Ideally I would like to have something like a `.liquidignore` file in the root of the project and be able to specify exclusions at a file/directory level there.

---

<div class="post-metadata">

**Author:** ![manunamz](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/manunamz/32/3696_2.png) [@manunamz](https://talk.jekyllrb.com/u/manunamz)\
**Post date:** [July 31, 2021, 5:10pm UTC](https://talk.jekyllrb.com/t/any-way-to-exclude-files-directories-from-liquid-processing/6282/2 "2021-07-31T17:10:30Z")

</div>

Sounds like v4.0 added a `render_with_liquid` frontmatter variable you can set (albeit on each file, I think):

```auto
---
render_with_liquid: false
---

```

(See “Jekyll processes all Liquid filters in code blocks” from [here](https://jekyllrb.com/docs/liquid/tags/))

---

<div class="post-metadata">

**Author:** ![qYjGM](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/qyjgm/32/3720_2.png) [@qYjGM](https://talk.jekyllrb.com/u/qYjGM)\
**Post date:** [July 31, 2021, 7:46pm UTC](https://talk.jekyllrb.com/t/any-way-to-exclude-files-directories-from-liquid-processing/6282/3 "2021-07-31T19:46:05Z")

</div>

Brilliant, thanks! It would’ve been nicer to have a handful of entries in a config file somewhere than hundreds of frontmatter changes but it’s better than nothing.

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [August 1, 2021, 2:17am UTC](https://talk.jekyllrb.com/t/any-way-to-exclude-files-directories-from-liquid-processing/6282/4 "2021-08-01T02:17:38Z")

</div>

You can use front matter defaults in your config to assign variables to groups of files instead of adding directly to each.

> **[Front Matter Defaults](https://jekyllrb.com/docs/configuration/front-matter-defaults/)**
>
> Using front matter is one way that you can specify configuration in the pages and posts for your site. Setting things like a default layout, or customizing the title, or specifying a more precise date/time for the post can all be added to your page...

---

<div class="post-metadata">

**Author:** ![qYjGM](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/qyjgm/32/3720_2.png) [@qYjGM](https://talk.jekyllrb.com/u/qYjGM)\
**Post date:** [August 1, 2021, 1:08pm UTC](https://talk.jekyllrb.com/t/any-way-to-exclude-files-directories-from-liquid-processing/6282/5 "2021-08-01T13:08:22Z")

</div>

Ah, that’s much better, thank you!
