Questions I Frequently Ask Myself When Working With Static Sites (like my fave, 11ty):

# Why is there a pipe symbol in my YAML frontmatter?

|- or just | is yaml for "multilines"

# Why is there a dash in the liquid {%- tag?

We can include hyphens in your tag syntax ({{-, -}}, {%-, -%}) to strip whitespace from left or right.

docs source

Nunjucks does it, too.

# How do I comment stuff in Nunjucks?

{# like this #}



Webmentions: 24 Likes 10 Retweets

4 Replies

fLaMEd fLaMEd

@cassey what a fantastic idea! source

Bob Monsour Bob Monsour

@cassey Good stuff! The lack of that dash in nunjucks has bitten me more times than I’m prepared to admit. Just yesterday, I even added a bunch of them to a template to see if that was my issue. It wasn't, but I’m also not taking them out. source

Cassey Lottman Cassey Lottman

I wrote the page in markdown and was having a heck of a time with the escapes for my codeblocks of nunjucks characters, til @uncenter in the #11ty discord pointed out I should add a templateEngineOverride to only process this file as markdown (not also... source

Lea Rosema Lea Rosema

@cassey thank you for this, also the advice about templateEngineOverride. Instantly bookmarked :) @uncenter source

These are webmentions via the IndieWeb and webmention.io.