Skip to content

Commit

Permalink
docs: fix advanced-feed
Browse files Browse the repository at this point in the history
  • Loading branch information
wudifeixue committed Mar 30, 2024
1 parent 0308925 commit 67ec7fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/joinus/advanced/advanced-feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 1

This guide is intended for advanced users who want to know how to create an RSS feed in detail. If you're new to creating RSS feeds, we recommend reading [Create Your Own RSSHub Route](/joinus/new-rss/start-code) first.

Once you have collected the data you want to include in your RSS feed, you can pass it to `ctx.set('data', obj)`. RSSHub's middleware [`template.ts`](https://github.com/DIYgod/RSSHub/blob/master/lib/middleware/template.ts) will then process the data and render the RSS output in the required format (which is RSS 2.0 by default). In addition to the fields mentioned in [Create your own RSSHub route](/joinus/new-rss/start-code), you can customize your RSS feed further using the following fields.
Once you have collected the data you want to include in your RSS feed, you can pass it to `ctx.set('data', obj)`. RSSHub's middleware [`template.tsx`](https://github.com/DIYgod/RSSHub/blob/master/lib/middleware/template.tsx) will then process the data and render the RSS output in the required format (which is RSS 2.0 by default). In addition to the fields mentioned in [Create your own RSSHub route](/joinus/new-rss/start-code), you can customize your RSS feed further using the following fields.

It's important to note that not all fields are applicable to all output formats since RSSHub supports multiple output formats. The table below shows which fields are compatible with different output formats. We use the following symbols to denote compatibility: `A` for Atom, `J` for JSON Feed, `R` for RSS 2.0.

Expand Down Expand Up @@ -97,7 +97,7 @@ By setting the `supportBT` attribute to `"1"`, you'll be able to update your doc

## Create a Journal Feed

RSSHub supports creating journal feeds that can replace `item.link` with a Sci-hub link if users provide the [common parameter](/parameter#sci-hub-link) `scihub`. To create a journal feed, you'll need to include an **additional** field in your RSS feed:
RSSHub supports creating journal feeds that can replace `item.link` with a Sci-hub link if users provide the [common parameter](/guide/parameters#sci-hub-link) `scihub`. To create a journal feed, you'll need to include an **additional** field in your RSS feed:

```js
ctx.set('data', {
Expand Down
4 changes: 2 additions & 2 deletions src/zh/joinus/advanced/advanced-feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 1

本指南面向希望深入了解如何制作 RSS 订阅源的高级用户。如果您是第一次制作 RSS 订阅源,我们建议先阅读 [制作自己的 RSSHub 路由](/zh/joinus/new-rss/start-code)

一旦您获取了要包含在您的 RSS 订阅源中的数据,就可以将其传递给 `ctx.set('data', obj)`。然后RSSHub的中间件 [`template.ts`](https://github.com/DIYgod/RSSHub/blob/master/lib/middleware/template.ts) 将处理数据并以所需的格式呈现 RSS 输出(默认为RSS 2.0)。除了 [制作自己的 RSSHub 路由](/zh/joinus/new-rss/start-code) 中提到的字段外,您还可以使用以下字段进一步自定义 RSS 订阅源。
一旦您获取了要包含在您的 RSS 订阅源中的数据,就可以将其传递给 `ctx.set('data', obj)`。然后RSSHub的中间件 [`template.tsx`](https://github.com/DIYgod/RSSHub/blob/master/lib/middleware/template.tsx) 将处理数据并以所需的格式呈现 RSS 输出(默认为RSS 2.0)。除了 [制作自己的 RSSHub 路由](/zh/joinus/new-rss/start-code) 中提到的字段外,您还可以使用以下字段进一步自定义 RSS 订阅源。

需要注意的是,并非所有字段都适用于所有的输出格式,因为 RSSHub 支持多种输出格式。下表显示了不同输出格式兼容的字段。我们使用以下符号表示兼容性:`A` 表示 Atom,`J` 表示 JSON Feed,`R` 表示 RSS 2.0。

Expand Down Expand Up @@ -97,7 +97,7 @@ ctx.set('data', {

## 制作期刊订阅源

RSSHub支持制作期刊订阅源。如果用户提供 [通用参数](/zh/parameter#输出-sci-hub-链接) `scihub`,则可以将 `item.link` 替换为 Sci-hub 链接。要制作期刊订阅源,您需要在您的 RSS 源中包含一个附加字段:
RSSHub支持制作期刊订阅源。如果用户提供 [通用参数](/zh/guide/parameters#输出-sci-hub-链接) `scihub`,则可以将 `item.link` 替换为 Sci-hub 链接。要制作期刊订阅源,您需要在您的 RSS 源中包含一个附加字段:

```js
ctx.set('data', {
Expand Down

0 comments on commit 67ec7fc

Please sign in to comment.