diff --git a/website/docs/instances.md b/website/docs/instances.md new file mode 100644 index 000000000..f98fa6904 --- /dev/null +++ b/website/docs/instances.md @@ -0,0 +1,15 @@ +# Public Instances + +Although the official instances are already stable enough, in order to achieve decentralization, we encourage users to host their own RSSHub instances or use other public RSSHub instances. + +If you are willing to contribute your own instance for others to use, please edit [this file](https://github.com/DIYgod/RSSHub/tree/master/website/src/components/InstanceList.tsx) and submit a PR to add your instance to the list. + +## Official + +| URL | Location | Maintainer | Online | +| --- | --- | --- | --- | +| [rsshub.app](https://rsshub.app) | 🇺🇸 | [DIYgod](https://diygod.cc) | ![](https://img.shields.io/website.svg?label=&url=https://rsshub.app/test/cache) | + +## Public + + diff --git a/website/docs/usage.md b/website/docs/usage.md index a3d054e66..f3affc6ac 100644 --- a/website/docs/usage.md +++ b/website/docs/usage.md @@ -8,7 +8,7 @@ To subscribe to a Twitter user's timeline, first look at the route document of [ The demo instance will generate an RSS feed at `https://rsshub.app/twitter/user/DIYgod`, use your own domain name when applicable. This feed should work with all RSS readers conforming to the RSS Standard. -You can replace the domain name `https://rsshub.app` with your [self-hosted instance](/install). +You can replace the domain name `https://rsshub.app` with your [self-hosted instance](/install) or any [public instance](/instances). RSSHub supports additional parameters such as content filtering and full-text extraction, refer to [Parameters](/parameter) for details. diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 6adf1e1f1..6533a8b1d 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -135,7 +135,7 @@ const config: Config = { to: '/', position: 'left', label: 'Guide', - activeBaseRegex: '^/(usage|faq|parameter|api)?$', + activeBaseRegex: '^/(usage|instances|faq|parameter|api)?$', }, { to: '/routes', diff --git a/website/i18n/zh/docusaurus-plugin-content-docs/current/instances.md b/website/i18n/zh/docusaurus-plugin-content-docs/current/instances.md new file mode 100644 index 000000000..3b14b3f6d --- /dev/null +++ b/website/i18n/zh/docusaurus-plugin-content-docs/current/instances.md @@ -0,0 +1,15 @@ +# 公共实例 + +尽管官方实例已经足够稳定,但为了实现去中心化,我们鼓励用户自行托管 RSSHub 实例或使用其他公共 RSSHub 实例。 + +如果你愿意贡献你自己的实例给他人使用,请编辑[此文件](https://github.com/DIYgod/RSSHub/tree/master/website/src/components/InstanceList.tsx) 并提交 PR 将你的实例添加到列表中。 + +## Official + +| URL | Location | Maintainer | Online | +| --- | --- | --- | --- | +| https://rsshub.app | 🇺🇸 | [DIYgod](https://diygod.cc) | ![](https://img.shields.io/website.svg?label=&url=https://rsshub.app/test/cache) | + +## Public + + diff --git a/website/i18n/zh/docusaurus-plugin-content-docs/current/usage.md b/website/i18n/zh/docusaurus-plugin-content-docs/current/usage.md index 412ee7c87..5d813e563 100644 --- a/website/i18n/zh/docusaurus-plugin-content-docs/current/usage.md +++ b/website/i18n/zh/docusaurus-plugin-content-docs/current/usage.md @@ -8,7 +8,7 @@ 然后我们可以把 `https://rsshub.app/twitter/user/DIYgod` 添加到任意 RSS 阅读器里来使用 -其中域名 `https://rsshub.app` 可以替换为你[自部署](/zh/install)的域名 +其中域名 `https://rsshub.app` 可以替换为你[自部署](/zh/install)或任意[公共实例](/zh/instances)的域名 另外 RSSHub 支持很多实用的参数,比如内容过滤、全文输出等,可以在 [通用参数](/zh/parameter) 文档了解具体使用方法 diff --git a/website/sidebars.mjs b/website/sidebars.mjs index eb534498c..0f8231066 100644 --- a/website/sidebars.mjs +++ b/website/sidebars.mjs @@ -32,7 +32,7 @@ const sidebars = { { type: 'category', label: 'Guide', - items: ['README', 'usage', 'faq', 'parameter', 'api'], + items: ['README', 'usage', 'instances', 'faq', 'parameter', 'api'], collapsible: true, collapsed: true, }, diff --git a/website/src/components/InstanceList.tsx b/website/src/components/InstanceList.tsx new file mode 100644 index 000000000..0b2b0806a --- /dev/null +++ b/website/src/components/InstanceList.tsx @@ -0,0 +1,54 @@ +export default function InstanceList(): JSX.Element { + const instances = [{ + url: 'https://rsshub.rssforever.com', + location: '🇦🇪', + maintainer: 'Stille', + maintainerUrl: 'https://www.ioiox.com', + }, { + url: 'https://rsshub.feeded.xyz', + location: '🇺🇸', + maintainer: '胜之不易', + maintainerUrl: 'https://uneasy.win', + }, { + url: 'https://hub.slarker.me', + location: '🇺🇸', + maintainer: 'Slarker', + maintainerUrl: 'https://slarker.me', + }, { + url: 'https://rsshub.liumingye.cn', + location: '🇭🇰', + maintainer: '刘明野', + maintainerUrl: 'https://www.liumingye.cn', + }] + + return ( + + + + + + + + + + + {instances.map((instance) => ( + + + + + + + ))} + +
URLLocationMaintainerOnline
+ {new URL(instance.url).host} + {instance.location} + {instance.maintainer ? ( + {instance.maintainer} + ) : 'Anonymous'} + + +
+ ); +} diff --git a/website/src/theme/MDXComponents.ts b/website/src/theme/MDXComponents.ts index 1e72aeca8..7f308bb9e 100644 --- a/website/src/theme/MDXComponents.ts +++ b/website/src/theme/MDXComponents.ts @@ -1,6 +1,7 @@ import MDXComponents from '@theme-original/MDXComponents'; import Badge from '@site/src/components/Badge'; import Route from '@site/src/components/Route'; +import InstanceList from '@site/src/components/InstanceList'; import Link from '@docusaurus/Link'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -10,6 +11,7 @@ export default { ...MDXComponents, Badge, Route, + InstanceList, Link, Tabs, TabItem,