显示来自任何 RSS 或 Atom 源的条目。
属性
通过块.json 中的 attributes 属性定义。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
columns | number | 2 | — |
blockLayout | string | "list" | — |
feedURL | string | "" | 角色: content |
itemsToShow | number | 5 | — |
displayExcerpt | boolean | false | — |
displayAuthor | boolean | false | — |
displayDate | boolean | false | — |
excerptLength | number | 55 | — |
openInNewTab | boolean | false | — |
rel | string | — | — |
支持
通过块.json 中的 supports 属性定义。
anchor:truealign:truehtml:falseinteractivity:clientNavigation:true
spacing:margin:truepadding:true
dimensions:minHeight:trueminWidth:true
shadow:truebackground:backgroundImage:truebackgroundSize:truegradient:true
color:background:truetext:truegradients:truelink:true
块标记
这是一个 动态块。它在服务器上渲染,不会在帖子内容中保存 HTML。
在帖子内容中,它存储为块注释:
<!-- wp:rss {"blockLayout":"grid","displayDate":true,"displayExcerpt":true,"displayAuthor":true,"excerptLength":20,"feedURL":"https://wordpress.org/news/","itemsToShow":4} /-->
来源
- block.json (参考)
- 源目录 — 浏览
edit和save源文件、index.php等。