Files
news_service/.env.example
Weng JinPeng 08cdfe7607 feat: pin a fixed article to the top of news results
Add PinnedArticleService that always returns configured Naver articles
first to the front-end. Articles are built from a bare URL via a new
NewsApiClient.buildArticleFromUrl (OG/meta parsing + existing content and
image-localization pipeline), cached to disk with a TTL, and prepended
with de-duplication in NewsStorageService. Configurable via
NEWS_PINNED_ARTICLE_URLS / NEWS_PINNED_CATEGORIES / NEWS_PINNED_TTL_MS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 16:33:17 +08:00

14 lines
580 B
Plaintext

PORT=3100
NEWS_PAGE_SIZE=20
NEWS_REFRESH_CRON=0 * * * *
DATA_DIR=./data
# Pinned articles: always returned first, in order, to the front-end.
# Comma-separated Naver article URLs.
NEWS_PINNED_ARTICLE_URLS=https://n.news.naver.com/mnews/article/009/0005689327
# Categories the pins apply to (comma-separated keys: flashnews,mainnews,ranknews,worldnews
# or front-end aliases finance,business,technology,market). Leave empty for all categories.
NEWS_PINNED_CATEGORIES=
# How long (ms) a built pin stays cached before a rebuild is attempted. Default 6h.
NEWS_PINNED_TTL_MS=21600000