Let’s say I have a Javascript file with code similar to the following. And note that this is an edited and truncated version of what’s in lunr.store.js
, so I hope I’m not violating any rules by posting it:
var store = [
{%- for c in site.collections -%}
{%- for doc in c.docs -%}
{
...
"excerpt":
{{ doc.content ...
If the .md file that doc
references has Liquid statements in it, those statements aren’t expanded yet. In other words doc.content
will return the liquid statements instead of what they eventually become when the html file for that page is produced.
I hope that makes sense.
Is there a way I can get the version of doc.content
(i.e. page.content
) that has the Liquid statements already evaluated/expanded/whatever?
Sheesh, I hope this makes sense. Thanks in advance.