Skip to content

Commit

Permalink
docs: update joinus
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Apr 5, 2024
1 parent 6ca4022 commit eb1a521
Show file tree
Hide file tree
Showing 14 changed files with 782 additions and 1,997 deletions.
12 changes: 1 addition & 11 deletions .vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,12 @@ export const shared = defineConfig({
text: 'Develop',
items: [
{ text: 'Quick Start', link: '/joinus/' },
],
},
{
text: 'New RSSHub Rules',
items: [
{ text: 'Prerequisites', link: '/joinus/new-rss/prerequisites' },
{ text: 'Development Environment', link: '/joinus/new-rss/prerequisites' },
{ text: 'Just before you start', link: '/joinus/new-rss/before-start' },
{ text: 'Create Route', link: '/joinus/new-rss/start-code' },
{ text: 'Submit your route', link: '/joinus/new-rss/submit-route' },
],
},
{
items: [
{ text: 'New RSSHub Radar Rules', link: '/joinus/new-radar' },
],
},
{
text: 'Advanced',
items: [
Expand Down
12 changes: 1 addition & 11 deletions .vitepress/config/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,12 @@ export const zh = defineConfig({
text: '开发路由',
items: [
{ text: '快速开始', link: '/zh/joinus/' },
],
},
{
text: '提交新的 RSSHub 规则',
items: [
{ text: '准备工作', link: '/zh/joinus/new-rss/prerequisites' },
{ text: '开发环境', link: '/zh/joinus/new-rss/prerequisites' },
{ text: '开始之前', link: '/zh/joinus/new-rss/before-start' },
{ text: '制作路由', link: '/zh/joinus/new-rss/start-code' },
{ text: '提交路由', link: '/zh/joinus/new-rss/submit-route' },
],
},
{
items: [
{ text: '提交新的 RSSHub Radar 规则', link: '/zh/joinus/new-radar' },
],
},
{
text: '高级用法',
items: [
Expand Down
5 changes: 0 additions & 5 deletions src/joinus/advanced/_category_.json

This file was deleted.

12 changes: 9 additions & 3 deletions src/joinus/advanced/script-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ sidebar_position: 2
- Use `kebab-case` for files and folders.
- Use `CONSTANT_CASE` for constants.

## Route Standard
### v2 Route Standard

:::danger

The v2 Route Standard is deprecated. All new routes should be following the [Create Route](/joinus/new-rss/start-code).

:::

When creating a new route in RSSHub, you need to organize your files in a specific way. Your namespace folder should be stored in the `lib/routes` directory and should include three mandatory files:

Expand Down Expand Up @@ -156,10 +162,10 @@ import { art } from '@/utils/render';
const renderAuthor = (author) => art(path.join(__dirname, 'templates/author.art'), author);
```

### v1 Route Standard
## v1 Route Standard

:::danger

The v1 Route Standard is deprecated. All new routes should be following the [Route Standard](/joinus/advanced/script-standard#route-standard).
The v1 Route Standard is deprecated. All new routes should be following the [Create Route](/joinus/new-rss/start-code).

:::
23 changes: 2 additions & 21 deletions src/joinus/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you've found a bug or have a suggestion for improving RSSHub, we'd love to he

## Join the discussion

[![Telegram Group](https://img.shields.io/badge/chat-telegram-brightgreen.svg?logo=telegram&style=for-the-badge)](https://t.me/rsshub) [![GitHub issues](https://img.shields.io/github/issues/DIYgod/RSSHub?color=bright-green&logo=github&style=for-the-badge)](https://github.com/DIYgod/RSSHub/issues)
[![Telegram group](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.swo.moe%2Fstats%2Ftelegram%2Frsshub&query=count&color=2CA5E0&label=Telegram%20Group&logo=telegram&cacheSeconds=3600&style=flat-square)](https://t.me/rsshub) [![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/DIYgod/RSSHub?style=flat-square&label=GitHub%20issues&logo=github)](https://github.com/DIYgod/RSSHub/issues)

## Before you begin

Expand All @@ -22,31 +22,12 @@ If you don't know much about them but would like to learn them, here are some go

If you'd like to see examples of how other developers use these technologies to create RSS feeds, you can take a look at some of the code in [our repository](https://github.com/DIYgod/RSSHub/tree/master/lib/routes).

## Submit new RSSHub rules
## Start developing RSSHub routes

If you've found a website that doesn't offer an RSS feed, you can create an RSS rule for it using RSSHub. An RSS rule is a short Node.js program code (hereafter referred to as "route") that tells RSSHub how to extract content from a website and generate an RSS feed. By creating a new RSS route, you can help make content from your favourite websites more accessible and easier to follow.

Before you start writing an RSS route, please make sure that the source site does not provide RSS. Some web pages will include a link element with type `application/atom+xml` or `application/rss+xml` in the HTML header to indicate the RSS link.

Here's an example of what an RSS link might look like in the HTML header: `<link rel="alternate" type="application/rss+xml" href="http://example.com/rss.xml" />`. If you see a link like this, it means that the website already has an RSS feed and you don't need to create a new RSS route for it.

### Getting started

In this guide, you'll learn how to create a new RSS route from scratch. We'll cover everything from setting up your development environment to submitting your code to the RSSHub repository. By the end of this guide, you'll be able to create your own RSS feeds for websites that don't offer them.

[Ready to get started? Click here to dive into the guide!](/joinus/new-rss/prerequisites)

## Submit new RSSHub Radar rules

### Before you start

It's recommended that you download and install RSSHub Radar in your browser before you start.

Once you have installed RSSHub Radar, open the settings and switch to the "List of rules" tab. Then scroll down to the bottom of the page and you will see a text field. Here, you can replace the old rules with your new rules for debugging.

[Let's start!](/joinus/new-radar)

<a href="https://chrome.google.com/webstore/detail/rsshub-radar/kefjpfngnndepjbopdmoebkipbgkggaa" target="_blank" rel="noopener noreferrer"><img src="https://storage.googleapis.com/web-dev-uploads/image/WlD8wC6g8khYWPJUsQceQkhXSlv1/UV4C4ybeBTsZt43U4xis.png" alt="Get RSSHub Radar for Chromium" style="height: 58px" /></a>
<a href="https://addons.mozilla.org/firefox/addon/rsshub-radar/" target="_blank" rel="noopener noreferrer"><img src="https://blog.mozilla.org/addons/files/2020/04/get-the-addon-fx-apr-2020.svg" alt="Get Get RSSHub Radar for Firefox" style="height: 58px" /></a>
<a href="https://microsoftedge.microsoft.com/addons/detail/rsshub-radar/gangkeiaobmjcjokiofpkfpcobpbmnln" target="_blank" rel="noopener noreferrer"><img src="https://wsrv.nl/?url=https://upload.wikimedia.org/wikipedia/commons/f/f7/Get_it_from_Microsoft_Badge.svg" alt="Get RSSHub Radar for Edge" style="height: 58px" /></a>
<a href="https://apps.apple.com/us/app/rsshub-radar/id1610744717" target="_blank" rel="noopener noreferrer"><img src="https://developer.apple.com/news/images/download-on-the-app-store-badge.png" alt="Get RSSHub Radar for Safari" style="height: 58px" /></a>
Loading

0 comments on commit eb1a521

Please sign in to comment.