Skip to content

feat(news): add NewsUrl config and prefer content:encoded for full news display - #1564

Open
lingdiansr wants to merge 2 commits into
Morganamilo:masterfrom
lingdiansr:multilingual-news-support
Open

feat(news): add NewsUrl config and prefer content:encoded for full news display#1564
lingdiansr wants to merge 2 commits into
Morganamilo:masterfrom
lingdiansr:multilingual-news-support

Conversation

@lingdiansr

@lingdiansr lingdiansr commented Jun 13, 2026

Copy link
Copy Markdown

This PR adds support for fetching Arch Linux news from alternative RSS feeds and improves the news display by showing the full article content when available.

Changes

  • New NewsUrl config option and --newsurl CLI flag

    • Allows users to override the default Arch Linux news feed URL (https://archlinux.org/feeds/news).
    • Example in paru.conf:
      [options]
      NewsUrl = https://archlinux.fr/feed/
      
    • Example via CLI:
      paru --newsurl https://archlinux.fr/feed/ -Pw
      
  • Prefer full content from <content:encoded>

    • Some RSS feeds, such as archlinux.fr and archlinuxcn.org, provide only a truncated summary in <description> while including the full article HTML in <content:encoded>.
    • The news parser now checks <content:encoded> first and falls back to <description> if it is missing or empty.
  • Documentation & completions

    • Updated man/paru.conf.5, man/paru.8, and shell completions (bash, fish, zsh) for the new option/flag.

Motivation

This makes it easier for users to point paru at localized Arch Linux news sites (French, Chinese, etc.) without hard-coding URLs.

Relation to PR #1071

PR #1071 allows specifying a news feed URL by reusing the NewsOnUpgrade option (e.g. NewsOnUpgrade = https://...). This conflates a boolean flag with a URL value and does not address feeds that only expose full content via <content:encoded>.

This PR instead introduces a dedicated NewsUrl option plus a --newsurl CLI flag, keeping NewsOnUpgrade as a pure boolean. It also handles <content:encoded> so that localized feeds render the full article rather than a truncated summary.

As a result, this PR supersedes #1071.

Known Limitation

Testing

  • cargo build and cargo test pass.
  • Manually verified with:
    • Default Arch Linux news feed
    • https://archlinux.fr/feed/
    • https://archlinuxcn.org/feed/

lingdiansr added 2 commits June 13, 2026 13:08
Adds a new NewsUrl config option and --newsurl command line flag that
allows users to specify a custom RSS/Atom feed URL for paru's news
feature. When not specified, paru falls back to the Arch Linux official
news feed (arch_url.join("feeds/news")).

The existing NewsOnUpgrade option is left untouched and continues to
control whether news are printed during sysupgrade.

Closes Morganamilo#1071
When an RSS item provides a <content:encoded> element, use it instead
of the truncated <description>. This allows localized news feeds
(archlinuxcn, archlinux.fr, etc.) to display their full content.

Fallback to <description> remains for feeds that do not provide
content:encoded (e.g. the official Arch Linux news feed).
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.

1 participant