indieweb:eleventy_gotchas
Differences
This shows you the differences between two versions of the page.
| indieweb:eleventy_gotchas [2026/09/23 14:52] – created - external edit 127.0.0.1 | indieweb:eleventy_gotchas [2026/10/23 14:54] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== 1. HTML Escaping in Nunjucks ===== | ===== 1. HTML Escaping in Nunjucks ===== | ||
| - | **Symptom: | + | **Symptom: |
| **Cause:** Nunjucks escapes HTML by default for security. Correct when handling user input; wrong when rendering your own compiled content. | **Cause:** Nunjucks escapes HTML by default for security. Correct when handling user input; wrong when rendering your own compiled content. | ||
| Line 35: | Line 35: | ||
| </ | </ | ||
| - | **Fix 3:** When grouping by month, use UTC methods | + | **Fix 3:** When grouping by month, use UTC methods: '' |
| <code javascript> | <code javascript> | ||
| const utcYear | const utcYear | ||
| Line 46: | Line 46: | ||
| ===== 3. collections.all Includes Template Files ===== | ===== 3. collections.all Includes Template Files ===== | ||
| - | **Symptom: | + | **Symptom: |
| **Fix:** Be explicit with glob patterns instead of relying on '' | **Fix:** Be explicit with glob patterns instead of relying on '' | ||
indieweb/eleventy_gotchas.1790196766.txt.gz · Last modified: by 127.0.0.1
