我见过使用src="example.com/json“的amp-list。但是有没有办法在amp-list中使用blogger json feed呢?
<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>发布于 2020-09-08 23:31:26
是的,有一种方法可以在amp列表中使用blogger JSON;为此,您需要提到items='feed.entry'以进入JSON的细分,然后遵循八字胡模板指南来获取所需字段。
发布于 2020-09-01 15:53:57
您应该能够通过使用以下模板配置来呈现来自博客提要的数据-
<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>https://stackoverflow.com/questions/63641205
复制相似问题