newsnow README

The project's README from github.com/newsnext/newsnow. As one markdown file: README.md.

English | 简体中文 | 日本語

[!NOTE] This is a demo version currently supporting Chinese only. A full-featured version with better customization and English content support will be released later.

Elegant reading of real-time and hottest news

Features

{
  "mcpServers": {
    "newsnow": {
      "command": "npx",
      "args": [
        "-y",
        "newsnow-mcp-server"
      ],
      "env": {
        "BASE_URL": "https://newsnow.busiyi.world"
      }
    }
  }
}

You can change the BASE_URL to your own domain.

Deployment

Basic Deployment

For deployments without login and caching:

  1. Fork this repository
  2. Import to platforms like Cloudflare Page or Vercel

Cloudflare Page Configuration

GitHub OAuth Setup

  1. Create a GitHub App
  2. No special permissions required
  3. Set callback URL to: https://your-domain.com/api/oauth/github (replace your-domain with your actual domain)
  4. Obtain Client ID and Client Secret

Environment Variables

Refer to example.env.server. For local development, rename it to .env.server and configure:

# Github Client ID
G_CLIENT_ID=
# Github Client Secret
G_CLIENT_SECRET=
# JWT Secret, usually the same as Client Secret
JWT_SECRET=
# Initialize database, must be set to true on first run, can be turned off afterward
INIT_TABLE=true
# Whether to enable cache
ENABLE_CACHE=true

Database Support

Supported database connectors: https://db0.unjs.io/connectors Cloudflare D1 Database is recommended.

  1. Create D1 database in Cloudflare Worker dashboard
  2. Configure database_id and database_name in wrangler.toml
  3. If wrangler.toml doesn't exist, rename example.wrangler.toml and modify configurations
  4. Changes will take effect on next deployment

Docker Deployment

In project root directory:

docker compose up

You can also set Environment Variables in docker-compose.yml.

Development

[!Note] Requires Node.js >= 20

corepack enable
pnpm i
pnpm dev

Adding Data Sources

Refer to shared/sources and server/sources directories. The project provides complete type definitions and a clean architecture.

For detailed instructions on how to add new sources, see CONTRIBUTING.md.

Roadmap

release when ready

Contributing

Contributions are welcome! Feel free to submit pull requests or create issues for feature requests and bug reports.

The new version is coming soon and we will no longer accept contributions

See CONTRIBUTING.md for detailed guidelines on how to contribute, especially for adding new data sources.

License

MIT © ourongxing

Sponsorship

If you rely on this service, sponsorship is welcome to help it run for the long term. If you need customization or other help, you can also use the contact method below and include a note.

newsnow (newsnext/newsnow)

Searching Database…

22.1K ·GitHub
这是什么东西?NewsNow 是一个开源网页应用,可以优雅地阅读实时新闻和热点资讯,把来自多个渠道的热门内容聚合到一个简洁、易读的界面里。
这是现成的网站,还是得自己部署?两者都有——既有可以直接使用的公开演示站,代码本身也支持自行部署,自行部署还能解锁 GitHub 登录、数据同步和缓存功能。
我怎么把它跑在自己的实例上?Fork 该仓库并导入到 Cloudflare Pages 或 Vercel——基础部署不需要登录和缓存(构建命令:pnpm run build,输出目录:dist/output/public)。也支持在项目根目录用 Docker 部署。
要开启登录和缓存这些完整功能需要什么?登录需要一个 GitHub OAuth App——不需要特殊权限,只要一个 Client ID 和 Secret。缓存需要一个数据库,推荐使用 Cloudflare D1。本地开发需要 Node.js >= 20。
有什么需要注意的坑吗?公开演示站目前只支持中文;包含英文内容和更强自定义功能的完整版本还在开发中。在新版本完成之前,贡献暂时暂停。
新闻更新有多及时?热点新闻实时更新,默认缓存 30 分钟;登录用户可以强制刷新。抓取间隔会根据各来源的更新频率自动调整(最快每 2 分钟一次),以节省资源并避免 IP 被封。
我能添加自己的新闻来源吗?可以。新闻来源位于 shared/sources 和 server/sources 目录,带有完整的类型定义和清晰的架构,CONTRIBUTING.md 里有添加新来源的详细说明。
MCP 服务器支持是干什么的?NewsNow 内置了 MCP 服务器支持,兼容 MCP 的 AI 工具和智能体可以通过编程方式读取它的新闻数据。
后续有什么计划?多语言支持(英文、中文等)、个性化选项(比如按分类看新闻、保存个人偏好),以及覆盖多种语言全球新闻的更多数据来源。
Creator
newsnext
Size
6.1 MB
Stars
22.1K
Age
2y
Commits · 90 Days