feat(news): add NewsUrl config and prefer content:encoded for full news display - #1564
Open
lingdiansr wants to merge 2 commits into
Open
feat(news): add NewsUrl config and prefer content:encoded for full news display#1564lingdiansr wants to merge 2 commits into
lingdiansr wants to merge 2 commits into
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
NewsUrlconfig option and--newsurlCLI flaghttps://archlinux.org/feeds/news).paru.conf:Prefer full content from
<content:encoded>archlinux.frandarchlinuxcn.org, provide only a truncated summary in<description>while including the full article HTML in<content:encoded>.<content:encoded>first and falls back to<description>if it is missing or empty.Documentation & completions
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
paruat 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
NewsOnUpgradeoption (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
NewsUrloption plus a--newsurlCLI flag, keepingNewsOnUpgradeas 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
archlinux.deis not supported yet. The site provides an Atom feed athttps://archlinux.de/news/feed/, andparu's current RSS parser (rsscrate) cannot parse Atom feeds. Adding Atom support would require introducing a new dependency such asatom_syndication. I have intentionally left this out to keep this PR focused and avoid conflicting with ongoing dependency/edition update PRs (Update to Rust 2024 edition with latest dependencies #1467, edition upgrade, updated dependencies and code improvments #1528). Atom support can be added in a follow-up PR once those land.Testing
cargo buildandcargo testpass.https://archlinux.fr/feed/https://archlinuxcn.org/feed/