Fix JSONFeed version field

Unfortunately, the only working validator I found can only validate live URLs
This commit is contained in:
rubenwardy 2024-07-02 21:02:25 +01:00
parent b4f9c99717
commit 19fa1d9b23

@ -27,7 +27,7 @@ bp = Blueprint("feeds", __name__)
def _make_feed(title: str, feed_url: str, items: list): def _make_feed(title: str, feed_url: str, items: list):
return { return {
"version": "https://jsonfeeds.org/version/1", "version": "https://jsonfeed.org/version/1",
"title": title, "title": title,
"description": gettext("Welcome to the best place to find Minetest mods, games, and texture packs"), "description": gettext("Welcome to the best place to find Minetest mods, games, and texture packs"),
"home_page_url": "https://content.minetest.net/", "home_page_url": "https://content.minetest.net/",
@ -79,7 +79,7 @@ def _get_releases_feed(query, feed_url: str):
items = [{ items = [{
"id": release.package.get_url("packages.view_release", id=release.id, absolute=True), "id": release.package.get_url("packages.view_release", id=release.id, absolute=True),
"language": "en", "language": "en",
"title": f"{release.title} - {release.package.title}", "title": f"Update: {release.title} - {release.package.title}",
"content_html": render_markdown(release.release_notes) \ "content_html": render_markdown(release.release_notes) \
if release.release_notes else _render_link(release.package.get_url("packages.view_release", id=release.id, absolute=True)), if release.release_notes else _render_link(release.package.get_url("packages.view_release", id=release.id, absolute=True)),
"author": { "author": {