Skip to content

Eleventy WebC v0.10.0: Declarative Loops and Flow Control

Compare
Choose a tag to compare
@zachleat zachleat released this 24 Mar 22:31
· 14 commits to main since this release

Upgrades to WebC v0.10.0: more context on the full WebC Release Notes

  • webc:for for looping https://www.11ty.dev/docs/languages/webc/#webcfor-loops
  • webc:elseif and webc:else https://www.11ty.dev/docs/languages/webc/#webcelseif-and-webcelse
  • Server-only HTML comments <!--- One more dash at the start and end ---> https://www.11ty.dev/docs/languages/webc/#server-only-comments
  • <script webc:type="js"> (via implied webc:is="template") will be treated as HTML-only components and not use the host component tags (via implied webc:nokeep).
  • Relax circular dependency errors: instead of throwing an error, we now treat this as a plain HTML tag instead of a WebC component. This makes it easier to override HTML tags (e.g. img.webc returning an <img> without needing using webc:root="override").
  • ⚠️ BREAKING (but low-impact): void elements (self-closing elements without a closing tag) used as components will be ignored in output when the component has child content. (e.g. img.webc returning an <img> without needing to use webc:root="override")

Full Changelog: v0.9.4...v0.10.0