diff --git a/docs/en/joinus/README.md b/docs/en/joinus/README.md index da1fb8d2de..6fd6254772 100644 --- a/docs/en/joinus/README.md +++ b/docs/en/joinus/README.md @@ -314,6 +314,7 @@ ctx.state.data = { link: '', // The feed link description: '', // The feed description language: '', // The language of the channel + allowEmpty: false, // default to false, set to true to allow empty item item: [ // An article of the feed { @@ -366,7 +367,29 @@ ctx.state.data = { }; ``` - +##### Media RSS + +these **additional** data are in accordance with many [Media RSS](http://www.rssboard.org/media-rss) softwares' subscription format: + +For example: + +```js +ctx.state.data = { + item: [ + { + media: { + content: { + url: post.file_url, + type: `image/${mime[post.file_ext]}`, + }, + thumbnail: { + url: post.preview_url, + }, + }, + }, + ], +}; +``` --- diff --git a/docs/joinus/README.md b/docs/joinus/README.md index d6d98db4d4..d89c1136e4 100644 --- a/docs/joinus/README.md +++ b/docs/joinus/README.md @@ -313,6 +313,7 @@ ctx.state.data = { link: '', // 指向项目的链接 description: '', // 描述项目 language: '', // 频道语言 + allowEmpty: false, // 默认 false,设为 true 可以允许 item 为空 item: [ // 其中一篇文章或一项内容 { @@ -365,10 +366,9 @@ ctx.state.data = { }; ``` -### 媒体 RSS +##### 媒体源 -用于支持 Media RSS 的软件,可以额外附加媒体信息到 RSS。 -media 节点下的 key 都是动态的,如何填写请参考 Media RSS[文档](http://www.rssboard.org/media-rss) +**额外**添加这些字段能使你的 RSS 被支持 [Media RSS](http://www.rssboard.org/media-rss) 的软件订阅: 示例: