mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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.
		
			
				
	
	
		
			31 lines
		
	
	
		
			980 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			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
 |