blogger - 有没有办法在 AMP 列表中使用 Blogger?alt=Json 提要

标签 blogger amp-list

我看过 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/

相关文章:

amp-html - AMP 在 Show More 上显示加载指示器

javascript - Blogger 的布局标签在 HTML 中不受支持 : need javascript help

python - 博主API : How to get posts *updated* in a particular timeframe?

php - 回显 simplexml 对象

amp-html - AMP 列表 - 如果我们没有收到 API 的响应,如何删除空白?

javascript - Amp 中 Json 值的子字符串

jquery - 动画滚动到顶部链接

javascript - 如何为帖子添加图片链接?

php - 谷歌AMP : amp-list vs php loop - SEO/Pagespeed

amp-html - 将状态映射到 amp-list [src]