我看过 amp-list使用 src="example.com/json"。但是有没有办法在 amp-list 中使用 blogger json 提要?
<amp-list width="auto" height="140" layout="fixed-height"
src="https://example.blogspot.com/feeds/posts/default?alt=json">
<template type="amp-mustache">
-----
</template>
</amp-list>
最佳答案
您应该能够使用以下模板配置呈现来自 Blogger 提要的数据 -
<amp-list width="auto" height="140" layout="fixed-height" items="feed.entry" src="...?alt=json">
<template type="amp-mustache">
<div class="title">{{#title}}{{$t}}{{/title}}</div> <!-- Shows the title of the post -->
<div class="content">{{#content}}{{{$t}}}{{/content}}</div> <!-- Shows santized content -->
</template>
</amp-list>
关于blogger - 有没有办法在 AMP 列表中使用 Blogger?alt=Json 提要,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63641205/