Skip to content

Question about an un-documented page data value: page.templateSyntax #3226

Answered by pdehaan
minimo-io asked this question in Q&A
Discussion options

You must be logged in to vote

I imagine it's safe to use… Or at least still seemed to still be in Eleventy v3.0.0-alpha.5 (via npm i @11ty/eleventy@canary) -- which means it possibly wasn't Edge-template specific.
Although curiously when I checked the templateSyntax for a .md template, it gave me "liquid,md" since it uses LiquidJS to preprocess Markdown files.

grep "templateSyntax:" www-201/*/index.html

www-201/liquid/index.html:  templateSyntax: 'liquid',
www-201/markdown/index.html:  templateSyntax: 'liquid,md',
www-201/nunjucks/index.html:  templateSyntax: 'njk',

Where my src/liquid.liquid template looks like this:

---
title: LiquidJS
---

<pre>
{{ page | inspect }}
</pre>

And my custom inspect filter in my eleven…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@pdehaan
Comment options

@minimo-io
Comment options

Answer selected by minimo-io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants