Files
zulip/zerver/lib/url_redirects.py
Shubham Padia 8f16f1139e help: Move URL redirects from Django to Astro.
Fixes #35649.

We do not serve the astro build via Django and thus we have to move the
help center redirects. We get a warning by pagefind on all these
redirects that they will be ignored in the search results as they don't
have an HTML body. We can ignore this warning till the cutover and
create a followup issue to solve that warning if this commit goes
through main.
2025-09-03 09:28:15 -07:00

31 lines
980 B
Python

from dataclasses import dataclass
@dataclass
class URLRedirect:
old_url: str
new_url: str
API_DOCUMENTATION_REDIRECTS: list[URLRedirect] = [
# Add URL redirects for REST API documentation here:
URLRedirect("/api/delete-stream", "/api/archive-stream"),
]
POLICY_DOCUMENTATION_REDIRECTS: list[URLRedirect] = [
# Add URL redirects for policy documentation here:
URLRedirect("/privacy/", "/policies/privacy"),
URLRedirect("/terms/", "/policies/terms"),
]
LANDING_PAGE_REDIRECTS = [
# Add URL redirects for corporate landing pages here.
URLRedirect("/new-user/", "/hello/"),
URLRedirect("/developer-community/", "/development-community"),
URLRedirect("/for/companies/", "/for/business"),
URLRedirect("/for/working-groups-and-communities/", "/for/communities"),
URLRedirect("/try-zulip/", "https://chat.zulip.org/?show_try_zulip_modal"),
]
DOCUMENTATION_REDIRECTS = API_DOCUMENTATION_REDIRECTS + POLICY_DOCUMENTATION_REDIRECTS