Translate the whole site to English: English routes with 301 redirects from the Dutch paths, English UI, docs, seeds and captions, one-time live content migration
This commit is contained in:
@@ -40,6 +40,16 @@ def get_post_by_slug(slug):
|
||||
return resolve_by_slug("posts", slug)
|
||||
|
||||
|
||||
def get_post_by_slug_tail(slug):
|
||||
tail = (slug or "").rsplit("-", 1)[-1]
|
||||
if "posts" not in db.tables or len(tail) != 12 or not all(c in "0123456789abcdef" for c in tail):
|
||||
return None
|
||||
for row in db["posts"].find(deleted_at=None):
|
||||
if row["uid"].replace("-", "").endswith(tail):
|
||||
return row
|
||||
return None
|
||||
|
||||
|
||||
def published_posts(topic=None, before=None, limit=25, user_uid=None):
|
||||
filters = {"status": "published"}
|
||||
if topic:
|
||||
|
||||
Reference in New Issue
Block a user