Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

corporate: Add canonical URLs.

Alex Vandivera925671179a1
diff --git a/corporate/views/portico.py b/corporate/views/portico.py
index cbcb0f62407..8c4c12dd7b7 100644
--- a/corporate/views/portico.py
+++ b/corporate/views/portico.py
@@ -297,6 +297,7 @@ def team_view(request: HttpRequest) -> HttpResponse:
"page_type": "team",
"contributors": data["contributors"],
},
+ "REL_CANONICAL_LINK": f"https://zulip.com{request.path}",
"date": data["date"],
},
)
@@ -310,6 +311,7 @@ def landing_view(request: HttpRequest, template_name: str) -> HttpResponse:
"billing_base_url": "",
"tier_cloud_standard": str(CustomerPlan.TIER_CLOUD_STANDARD),
"tier_cloud_plus": str(CustomerPlan.TIER_CLOUD_PLUS),
+ "REL_CANONICAL_LINK": f"https://zulip.com{request.path}",
}
)
@@ -318,7 +320,9 @@ def landing_view(request: HttpRequest, template_name: str) -> HttpResponse:
@add_google_analytics
def hello_view(request: HttpRequest) -> HttpResponse:
- return TemplateResponse(request, "corporate/hello.html", latest_info_context())
+ context = latest_info_context()
+ context["REL_CANONICAL_LINK"] = "https://zulip.com/"
+ return TemplateResponse(request, "corporate/hello.html", context)
@add_google_analytics
@@ -381,6 +385,7 @@ def communities_view(request: HttpRequest) -> HttpResponse:
request,
"corporate/communities.html",
context={
+ "REL_CANONICAL_LINK": f"https://zulip.com{request.path}",
"eligible_realms": eligible_realms,
"org_types": org_types,
},