The project was inspired by RSSHub
.
RSSHub
is an excellent open source project that successfully aggregates many sites and generates RSS. it also has the support of many developers.
But at the same time it has some problems:
- Routing mode. The
PR
ofRSSHub
is huge, which is definitely beyond imagination. Dealing with thesePR
s is a tough task, and there are already200
pendingPR
in existence. EachPR
basically symbolizes the addition of a new routing. Users are anxiously waiting, but the open source project has decided that themerge
progress will not be too fast, after all, the developers are supporting with love. - Commonjs.
RSSHub
is an excellent project that uses many of the same excellent dependencies, but for examplegot
, the latest version is alreadypure esm
.Commonjs
is hindering the development of the project, and as far as I know migration is already in its development plan, while I contribute myPR
, which makes me realize more deeply that migration is huge and difficult. - Maintenance difficulties. In fact, this is also caused by the routing pattern. Concentrate on a project where you need a
PR
for each individual route you make a change to. This likewise affects maintenance.
We need a solution. I tried to give PR
to help with the ESM
migration, but progress was difficult and there was little prospect.
Discussing the new routing specification with @aidistan on the RSSHub discussion forum, he had this to say:
- The
core
androuter
parts are truly split in meaning. - Change the
router
hierarchy to a personal maintenance and official maintenance section. - Use URLs to link to third-party routes.
I agree with all these points, so I choose Deno
as the program:
- Built-in
URL import
solution. - TS Support.
- Pure ESM support.
The core
part is only responsible for collecting routes and rendering them. Routes are recorded via routes.json
. The key-value pairs are stored in routes.json
: the keys are the route prefixes and the values are the routing module addresses.
This way we decouple the routing. Officially, only part of the routes are maintained, the rest need to be added after fork
. The routing address can be any URL, just expose a router.ts
, an example of which is given in the project.
However, this program is still incomplete, so if you have something to say about the above, please find me directly at issues
. Thank you.