DIYgod mirror
Go to file
Liao-Ke 6e5409d7eb
feat(route): add AI 博客 (#20488)
* feat(route): add AI 博客

新增了一个归档路由处理函数,用于抓取AI博客的所有文章归档。

- 定义了一个新的路由配置对象`route`,路径为`/archives`,属于`blog`类别。
- 使用`ofetch`获取归档页面内容,并通过`cheerio`解析HTML。
- 遍历每个月份分组内的每篇文章,提取标题、链接、发布时间,并存储在列表中。
- 对列表中的每个条目,使用`cache.tryGet`缓存文章详情,若无缓存则再次使用`ofetch`获取,并解析出文章的主要内容。
- 返回处理后的结果对象,包含优化后的标题、归档页面链接以及过滤无效数据后的文章列表。

新增了一个命名空间配置对象`namespace`,用于定义AI博客的基本信息。

- 定义了一个新的命名空间配置对象`namespace`,包含站点名称、URL和语言。

* refactor(handler): 优化归档页面处理逻辑

- 使用 `toArray()` 和 `flatMap()` 方法简化了遍历每个月份分组和提取文章信息的代码逻辑。
- 修正了 `link` 属性的处理,确保当链接不存在时返回空字符串。
- 添加了 `author` 和 `description` 属性到文章对象中,以便更完整地描述文章内容。
- 精简了每个文章项的 `description` 构建,去除了不必要的 HTML 结构复制。
2025-11-16 23:48:33 +08:00
.devcontainer chore: bump to node 24 (#20486) 2025-11-15 03:56:04 +08:00
.github chore: bump to node 24 (#20486) 2025-11-15 03:56:04 +08:00
.husky
.idx feat(utils/puppeteer): replace `puppeteer-extra-plugin-stealth` with `rebrowser` (#19506) 2025-07-01 04:38:05 +08:00
assets
eslint-plugins feat: more nsfw flag 2025-09-30 12:30:30 +08:00
lib feat(route): add AI 博客 (#20488) 2025-11-16 23:48:33 +08:00
logs
plugins feat: compile ts through tsdown (#18908) 2025-04-22 22:29:11 +08:00
scripts chore(deps-dev): bump tsdown from 0.15.12 to 0.16.0 (#20431) 2025-11-06 01:30:32 +08:00
.codecov.yml
.dockerignore chore(deps): update bbob packages to version 4.3.1 and clean up patches (#20323) 2025-10-18 05:35:49 +08:00
.editorconfig
.gitignore
.npmrc
.prettierignore feat: compile ts through tsdown (#18908) 2025-04-22 22:29:11 +08:00
.prettierrc
.puppeteerrc.cjs refactor: fix lint issue (#18963) 2025-04-29 03:00:16 +08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Dockerfile chore: bump to node 24 (#20486) 2025-11-15 03:56:04 +08:00
LICENSE
README.md docs: fix visitors count 2025-04-28 04:40:10 +08:00
SECURITY.md
app.json
babel.config.js
docker-compose.yml fix(route/picnob): use puppeteer-real-browser to pass cf check (#20478) 2025-11-14 15:32:09 +08:00
eslint.config.mjs chore: bump to node 24 (#20486) 2025-11-15 03:56:04 +08:00
fly.toml chore: update fly.toml 2025-06-06 21:38:15 +08:00
package.json chore: bump to vitest 4 (#20487) 2025-11-15 05:58:43 +08:00
pnpm-lock.yaml chore: bump to vitest 4 (#20487) 2025-11-15 05:58:43 +08:00
tailwind.config.js
tsconfig.json chore: add Vercel build configuration 2025-08-10 18:34:16 +08:00
tsdown-vercel.config.ts feat: vercel compatibility 2025-08-11 21:39:03 +08:00
tsdown.config.ts feat: vercel compatibility 2025-08-11 21:39:03 +08:00
vitest.config.ts chore: bump to vitest 4 (#20487) 2025-11-15 05:58:43 +08:00

README.md

RSSHub

RSSHub

🧡 Everything is RSSible

docker publish npm publish test Test coverage Visitors

Telegram group Telegram channel X (Twitter)

Introduction

RSSHub is the world's largest RSS network, consisting of over 5,000 global instances.

RSSHub delivers millions of contents aggregated from all kinds of sources, our vibrant open source community is ensuring the deliver of RSSHub's new routes, new features and bug fixes.

Documentation | Telegram Group | Telegram Channel | X (Twitter)

  • RSSHub Radar | A browser extension that can help you quickly discover and subscribe to the RSS and RSSHub of current websites.
  • RSSBud | RSSHub Radar for iOS platform, designed specifically for mobile ecosystem optimization.
  • RSSAid | RSSHub Radar for Android platform built with Flutter.
  • DocSearch | Link RSSHub DocSearch into Raycast

Contribute

We welcome all pull requests. Suggestions and feedback are also welcomed here.

Refer to Quick Start

Deployment

Refer to Deployment

Special Thanks

Logo designer sheldonrrr

              

Author

RSSHub © DIYgod, Released under the MIT License.
Authored and maintained by DIYgod with help from contributors (list).

Blog @DIYgod · GitHub @DIYgod · X (Twitter) @DIYgod · Telegram Channel @awesomeDIYgod