# Is there a way to preserve liquid variables across pages during processing?

**URL:** <https://talk.jekyllrb.com/t/is-there-a-way-to-preserve-liquid-variables-across-pages-during-processing/8718>\
**Category:** Help\
**Created:** [November 29, 2023, 11:07am UTC](https://talk.jekyllrb.com/t/is-there-a-way-to-preserve-liquid-variables-across-pages-during-processing/8718 "2023-11-29T11:07:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [November 30, 2023, 5:33am UTC](https://talk.jekyllrb.com/t/is-there-a-way-to-preserve-liquid-variables-across-pages-during-processing/8718/2 "2023-11-30T05:33:15Z")

</div>

You can’t access something across pages like that unfortunately.

I think the excerpt may not work if you post starts with something other than a p tag? does yours start with an image or something?

> [@{{page.excerpt}} does not work if first element is not \<p\>](https://talk.jekyllrb.com/t/page-excerpt-does-not-work-if-first-element-is-not-p/1224/):
>
> As the title says, if I’m using {{ page.excerpt | strip\_html | normalize\_whitespace | truncate: 160 | escape }} to generate meta descriptions. However, if a posts begins with an image or anything other than \<p\> it simply returns " ". Also, it seems this only picks up whatever is in the first \<p\> it finds, so even if the words within the first \<p\> are less than 160 characters, it still only displays that content. Is there a way around this?

seems hacky but maybe your code would work as an include and then pass in the post content as a parameter? not a great idea really.

---

_[View the full topic](https://talk.jekyllrb.com/t/is-there-a-way-to-preserve-liquid-variables-across-pages-during-processing/8718)._
