Skip to content

Comments

Fix weekend-analysis article type, localized back-to-news links, and excerpt truncation#440

Merged
pethers merged 2 commits intonews-realtime/2026-02-22-weekend-analysis-751b87f663d6aa99from
copilot/sub-pr-436
Feb 22, 2026
Merged

Fix weekend-analysis article type, localized back-to-news links, and excerpt truncation#440
pethers merged 2 commits intonews-realtime/2026-02-22-weekend-analysis-751b87f663d6aa99from
copilot/sub-pr-436

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

Weekend-analysis articles were misclassified as prospective, non-English articles linked back to the English index instead of their language-specific index, and excerpts were hard-cut mid-sentence at 200 chars.

Changes

  • scripts/generate-news-indexes.ts

    • Removed fileName.includes('weekend') from the prospective branch in classifyArticleType — weekend articles now fall through to analysis
    • Excerpt truncation now trims at last word boundary and appends ...:
      // Before
      excerpt: a.description.substring(0, 200),
      // After
      excerpt: a.description.length > 200 ? a.description.substring(0, 200).replace(/\s+\S*$/, '') + '...' : a.description,
  • 9 localized article files (ar, de, es, fr, he, ja, ko, nl, zh)
    Back-to-news links corrected from index.htmlindex_{lang}.html

  • 14 news index files regenerated to reflect corrected type: "analysis" and clean excerpts


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update weekend analysis on Sweden's security developments Fix weekend-analysis article type, localized back-to-news links, and excerpt truncation Feb 22, 2026
Copilot AI requested a review from pethers February 22, 2026 16:30
@pethers pethers marked this pull request as ready for review February 22, 2026 16:32
@pethers pethers merged commit 01f6209 into news-realtime/2026-02-22-weekend-analysis-751b87f663d6aa99 Feb 22, 2026
@pethers pethers deleted the copilot/sub-pr-436 branch February 22, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants