2

Can i just define some json inside my AMP (accelerated mobile pages) page and use it as amp-mustache source? Something like this:

<!-- somewhere in header -->
<script async="" custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.1.js"></script>

<!-- somewhere in body -->
<script>
var temp = { text : 'some text goes here ... '; },
</script>
<div type="amp-mustache"> <!-- without src="/some/file/with.json" -->
  {{ temp.text }}
</div>
pythoniesta
  • 317
  • 6
  • 19
Mr.Sion
  • 33
  • 5

0 Answers0