Merge branch 'feat/v2.17.0-article-urls' for v2.17.1 release
Build Container / build (push) Successful in 9m8s
Build Container / build (push) Successful in 9m8s
This commit is contained in:
commit
c9b882aa46
4 files changed
+23
-4
No files matched your search
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.17.1] - 2026-11-12
|
||||
|
||||
### Fixed
|
||||
|
||||
- Crossposting failed in 2.17.0 (never deployed): post URLs were built with Flask's `url_for`, which needs a web request, and crossposts run in a background worker. URLs are now built from `SITE_URL`
|
||||
|
||||
## [2.17.0] - 2026-11-12
|
||||
|
||||
Articles get URLs of their own (ADR-077).
|
||||
|
||||
@@ -21,3 +21,9 @@ slugs for notes, redirects both ways, updates via the old URL, slug rules
|
||||
(accents, duplicates, reserved, `mp-slug`, emoji, long titles), 201 on
|
||||
adding/removing a title, 410 for a deleted article, webmention targets and
|
||||
homepage links, search result URLs.
|
||||
|
||||
## v2.17.1
|
||||
|
||||
`post_url` first used `url_for`, which fails outside a request (the
|
||||
crosspost and backfeed workers); CI caught it in `test_likes_reposts.py`
|
||||
before 2.17.0 was built. It now joins `SITE_URL` and `post_path`.
|
||||
@@ -468,5 +468,5 @@ def create_app(config=None):
|
||||
|
||||
# Package version (Semantic Versioning 2.0.0)
|
||||
# See docs/standards/versioning-strategy.md for details
|
||||
__version__ = "2.17.0"
|
||||
__version_info__ = (2, 17, 0)
|
||||
__version__ = "2.17.1"
|
||||
__version_info__ = (2, 17, 1)
|
||||
+9
-2
@@ -722,8 +722,15 @@ def post_path(slug: str, title: Optional[str] = None) -> str:
|
||||
|
||||
|
||||
def post_url(slug: str, title: Optional[str] = None) -> str:
|
||||
"""A post's absolute URL (see post_path)"""
|
||||
return absolute_url_for("public.article" if title else "public.note", slug=slug)
|
||||
"""
|
||||
A post's absolute URL (see post_path)
|
||||
|
||||
Built from SITE_URL without url_for, so it works outside a request:
|
||||
crossposting and backfeed run in background workers (v2.17.0).
|
||||
"""
|
||||
from flask import current_app
|
||||
|
||||
return current_app.config["SITE_URL"].rstrip("/") + post_path(slug, title)
|
||||
|
||||
|
||||
def iso_utc(value) -> str:
|
||||
|
||||
Reference in new issue
Block a user