Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support script based templates #1125

Merged
merged 3 commits into from
Jan 15, 2021
Merged

Support script based templates #1125

merged 3 commits into from
Jan 15, 2021

Conversation

sebastianbenz
Copy link
Collaborator

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.

Copy link
Collaborator

@patrickkettner patrickkettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I can't find this documented anywhere, however. Is there any?

@sebastianbenz
Copy link
Collaborator Author

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

@patrickkettner
Copy link
Collaborator

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants