ampproject / amp-toolbox

A collection of AMP tools making it easier to publish and host AMP pages.
Apache License 2.0
449 stars 243 forks source link

Support script based templates #1125

Closed sebastianbenz closed 3 years ago

sebastianbenz commented 3 years ago

Make sure to always also support the script based template syntax:

<script type="text/plain" template="amp-mustache">
  Hello {{world}}!
</script>

Using the template helper should also make SSR more performant as it avoids a full parent traversal for each node.

sebastianbenz commented 3 years ago

It's documented here: https://amp.dev/documentation/components/amp-mustache/.

patrickkettner commented 3 years ago

oh, pft, I somehow changed it to amp-script powered templates when I was looking for docs. apologies.