docs: Add RSS feed for Pixi releases - #6749
Conversation
- New script scripts/generate_rss.py parses CHANGELOG.md and emits docs/feed.xml using feedgen (RSS 2.0) - Dates are taken from changelog headings (### [X.Y.Z] - YYYY-MM-DD); invalid dates exit with an informative error - New pixi task generate-rss wired as a depends-on for build-docs, docs, deploy-dev, and deploy-latest - New pixi task test-rss runs the inlined tests - docs/feed.xml added to .gitignore (build artifact) - feedgen and pytest added to feature.docs dependencies
| !!! tip | ||
|
|
||
| This changelog has an RSS feed, so you can keep up to date with new Pixi releases. Just make sure that you're subscribed to the RSS feed on the `latest` version tag (i.e., at [https://pixi.prefix.dev/latest/CHANGELOG/](https://pixi.prefix.dev/latest/CHANGELOG/) ) so that your feed updates correctly. | ||
|
|
There was a problem hiding this comment.
@Hofer-Julian yeah , good point about the material flavoured markdown.
I'm happy to remove entirely, but maybe its worth promoting somewhere in docs that there's an RSS feed now (and that you have to use the /latest one?)
EDIT: Or did you mean just making it not a callout block?
There was a problem hiding this comment.
Can this be added next to the socials like mastodon and bluesky?
4422806 to
eb9583a
Compare
Hofer-Julian
left a comment
There was a problem hiding this comment.
Thank you!
I added a few comments
| from datetime import date, datetime, timezone | ||
| from pathlib import Path | ||
|
|
||
| from feedgen.feed import FeedGenerator # ty: ignore[unresolved-import] |
There was a problem hiding this comment.
Let's make sure ty has access to that library by adding the package to a feature that is then added to the docs env and the env where ty runs
There was a problem hiding this comment.
Like so?
diff --git a/pixi.toml b/pixi.toml
index 567c4c2a47..f700659449 100644
--- a/pixi.toml
+++ b/pixi.toml
@@ -153,7 +153,6 @@
[feature.docs.pypi-dependencies]
# Fork of mike with Zensical support, not released on PyPI
-feedgen = ">=0.9,<1"
mike = { git = "https://github.com/squidfunk/mike" }
[feature.docs.tasks]
@@ -173,6 +172,8 @@
mike-serve = { cmd = "mike serve", description = "Serve versioned docs with mike" }
prepare-docs = { cmd = "python scripts/stage_docs_files.py && python scripts/generate_redirects.py && python scripts/generate_llmstxt.py && python scripts/generate_rss.py", description = "Stage docs files, generate redirect stubs, llms.txt, and RSS feed" }
+[feature.docs-rss.pypi-dependencies]
+feedgen = ">=0.9,<1"
#
# Feature for linting and formatting tools
#
@@ -424,7 +425,7 @@
"lint",
"schema",
"backends-release-deps",
- "docs",
+ "docs-rss",
], solve-group = "python" }
# TODO: get rid of rust in the docs env, figure out what to do with the docs generation code.
docs = { features = [
@@ -432,6 +433,7 @@
"compilers",
"python",
"docs",
+ "docs-rss",
], solve-group = "python" }
python-test = { features = [
"pytest",I think splitting the dep into a separate feature like this might run into the problem of prepare-docs failing with "module not found" if someone forgets to include the docs-rss feature in any env they want to prep the docs.
I think the simplest solution is to just add docs to the default env which is used for linting
| from feedgen.feed import FeedGenerator # ty: ignore[unresolved-import] | ||
|
|
||
| REPO_ROOT = Path(__file__).parent.parent | ||
| CHANGELOG = REPO_ROOT / "CHANGELOG.md" |
There was a problem hiding this comment.
Let's leave the changelog alone here
|
|
||
| def build_feed(entries: list[dict], *, site_url: str = SITE_URL) -> bytes: | ||
| """Build and return RSS 2.0 XML bytes from parsed changelog entries.""" | ||
| fg = FeedGenerator() |
There was a problem hiding this comment.
I am curious if we even need a dependency here. My impression is that it is very easy to generate RSS
There was a problem hiding this comment.
You're right, it wasn't that bad 75085e3
| !!! tip | ||
|
|
||
| This changelog has an RSS feed, so you can keep up to date with new Pixi releases. Just make sure that you're subscribed to the RSS feed on the `latest` version tag (i.e., at [https://pixi.prefix.dev/latest/CHANGELOG/](https://pixi.prefix.dev/latest/CHANGELOG/) ) so that your feed updates correctly. | ||
|
|
There was a problem hiding this comment.
Can this be added next to the socials like mastodon and bluesky?
| generate-cli-docs = { cmd = "cargo run --locked --manifest-path crates/pixi_docs/Cargo.toml", description = "Generate CLI documentation" } | ||
| mike-serve = { cmd = "mike serve", description = "Serve versioned docs with mike" } | ||
| prepare-docs = { cmd = "python scripts/stage_docs_files.py && python scripts/generate_redirects.py && python scripts/generate_llmstxt.py", description = "Stage docs files, generate redirect stubs and llms.txt" } | ||
| prepare-docs = { cmd = "python scripts/stage_docs_files.py && python scripts/generate_redirects.py && python scripts/generate_llmstxt.py && python scripts/generate_rss.py", description = "Stage docs files, generate redirect stubs, llms.txt, and RSS feed" } |
There was a problem hiding this comment.
Ooops, I missed that this doesn't use task dependencies. Can you please fix this?
There was a problem hiding this comment.
Not sure what you mean by this. Does prepare-docs need something to be run before it?
There was a problem hiding this comment.
Don't worry, I will fix it in a separate PR
3e59166 to
aace390
Compare
LLM output (Claude): The None key is valid lxml usage for setting the default namespace — the stubs are just too strict. The fix is to cast the dict to suppress the false positive


Description
Adds RSS feed for Pixi releases.
Fixes https://discord.com/channels/1082332781146800168/1082338253925003385/1533793109157216321
How Has This Been Tested?
AI Disclosure
Tools: Claude (see commit history for planning docs)
Checklist:
schema/model.py.