DIYgod mirror
Go to file
fishyo a8b004eb64
feat(route): add supercell game blog routes (#20545)
* feat(route): add supercell game blog routes

- Add support for 5 supercell games (Clash Royale, Brawl Stars, Clash of Clans, Boom Beach, Hay Day)
- Support 12 languages (en, zh, zh-hans, fr, de, id, it, ja, ko, pt, ru, es)
- Extract blog posts from __NEXT_DATA__ JSON
- Cache full article content with fallback to summary

* feat: add Supercell game blog route

* fix(supercell): use regex to extract __NEXT_DATA__ JSON, remove cheerio dependency

* fix(supercell): use bodyCollection to render content, fix namespace capitalization

* fix: improve supercell blog route to extract full content from bodyCollection

- Implement renderRichText and renderNodeContent functions to properly parse rich text JSON format
- Handle both TextBlock and FeatureBlock types from bodyCollection
- Support text formatting marks (bold, italic, underline, code)
- Add proper type annotations to handler function and variables
- Use Next.js JSON endpoint instead of HTML parsing for better performance
- Add error handling with fallback to description if full content extraction fails

* feat(supercell): add ImageBlock and CarouselBlock support for multi-game content extraction

* fix(supercell): use else-if chain and for-of loop for block handling

* refactor(supercell): extract renderBlock function to reduce complexity

* fix(supercell): use switch statement for block type handling
2025-12-04 23:59:51 +08:00
.devcontainer chore: update prettier extension identifier 2025-12-02 11:06:32 +08:00
.github chore(deps): bump actions/setup-node from 6.0.0 to 6.1.0 (#20627) 2025-12-03 16:31:27 +08:00
.husky chore(deps-dev): bump husky from 9.0.11 to 9.1.0 (#16200) 2024-07-18 20:04:24 +08:00
.idx chore: update prettier extension identifier 2025-12-02 11:06:32 +08:00
assets chore: fix rsshub.js.org not working (#14750) 2024-03-11 23:52:46 +08:00
eslint-plugins feat: more nsfw flag 2025-09-30 12:30:30 +08:00
lib feat(route): add supercell game blog routes (#20545) 2025-12-04 23:59:51 +08:00
logs
patches fix(deps): patch rss-parser to support gzip (#20619) 2025-12-03 04:11:56 +08:00
plugins style: auto format 2025-11-27 02:55:46 +00:00
scripts chore: fix prettier config 2025-11-27 14:32:29 +08:00
.codecov.yml
.dockerignore chore: update prettier extension identifier 2025-12-02 11:06:32 +08:00
.editorconfig
.gitignore fix(core): package mode (#20580) 2025-11-26 20:44:18 +08:00
.npmrc chore: set package-manager-strict to false 2024-05-24 02:46:38 +00:00
.prettierignore chore: fix prettier config 2025-11-27 14:32:29 +08:00
.prettierrc
.puppeteerrc.cjs refactor: fix lint issue (#18963) 2025-04-29 03:00:16 +08:00
CODE_OF_CONDUCT.md chore: fix prettier config 2025-11-27 14:32:29 +08:00
CONTRIBUTING.md fix(core): fix documentation link path and error message links (#15023) 2024-03-30 08:12:12 +00:00
Dockerfile fix(deps): patch rss-parser to support gzip (#20619) 2025-12-03 04:11:56 +08:00
LICENSE
README.md chore: fix prettier config 2025-11-27 14:32:29 +08:00
SECURITY.md chore: update outdated chore files 2024-03-09 20:30:59 +08:00
app.json chore: update outdated chore files 2024-03-09 20:30:59 +08:00
babel.config.js chore: recover format 2024-01-29 23:28:03 +08:00
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: fix prettier config 2025-11-27 14:32:29 +08:00
fly.toml chore: update fly.toml 2025-06-06 21:38:15 +08:00
package.json chore(deps): bump googleapis from 166.0.0 to 167.0.0 (#20636) 2025-12-04 16:13:29 +08:00
pnpm-lock.yaml chore(deps): bump googleapis from 166.0.0 to 167.0.0 (#20636) 2025-12-04 16:13:29 +08:00
tailwind.config.js feat: new home page 2024-03-03 17:36:08 +08:00
tsconfig.json chore: add Vercel build configuration 2025-08-10 18:34:16 +08:00
tsdown-lib.config.ts style: auto format 2025-11-27 02:55:46 +00:00
tsdown-vercel.config.ts style: auto format 2025-11-27 02:55:46 +00:00
tsdown.config.ts style: auto format 2025-11-27 02:55:46 +00:00
vitest.config.ts style: auto format 2025-11-27 02:55:46 +00: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