blogger - 有没有办法在 AMP-list 中使用 Blogger ?alt=Json 提要
问题描述
我已经看到使用 src="example.com/json"的amp-list 。但是有没有办法在 amp-list 中使用博主 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>
推荐阅读
- tensorflow - 机器学习 CTC 损失日志概率
- venn-diagram - 维恩图错误计算出两组的百分比?
- apache-spark - Spark HBase/BigTable - 宽/稀疏数据帧持久性
- python - 从数组索引验证我的 CNN 结果和分配的名称
- mongodb - 如何使用 Mongoose/MongoDB 在数组中定义对象
- node.js - npm install 在 Mac OS 上失败
- angular - 是否可以在 Firebase 托管和功能上预渲染 Angular Universal 和托管?
- javascript - 动态添加/显示选择选项的最佳实践 JS/jquery/PHP
- r - 如何重命名数据集的每个变量?
- typescript - 路径模块 - 无法读取未定义的“加入”属性