Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
meta tags: Use open graph titles/descriptions.
Tim Abbottb494b16791af
diff --git a/templates/zerver/base.html b/templates/zerver/base.htmlindex 615da6ded8c..2e83a756d00 100644--- a/templates/zerver/base.html+++ b/templates/zerver/base.html@@ -7,9 +7,13 @@<meta charset="UTF-8">{% block title %}{% if user_profile and user_profile.realm.name %}- <title>{{user_profile.realm.name}} - Zulip</title>+ <title>{{user_profile.realm.name}} - Zulip</title>{% else %}- <title>Zulip</title>+ {% if OPEN_GRAPH_TITLE %}+ <title>{{ OPEN_GRAPH_TITLE }}</title>+ {% else %}+ <title>Zulip</title>+ {% endif %}{% endif %}{% endblock %}<link id="favicon" rel="icon" href="/static/images/favicon.svg?v=4">diff --git a/templates/zerver/meta_tags.html b/templates/zerver/meta_tags.htmlindex 0005589e972..bf7eebe6da5 100644--- a/templates/zerver/meta_tags.html+++ b/templates/zerver/meta_tags.html@@ -1,8 +1,12 @@<!-- Google / Search Engine Tags -->{% if allow_search_engine_indexing %}-<meta name="description" content="Zulip combines the immediacy of real-time chat with an email threading model. With Zulip, you can catch up on important conversations while ignoring irrelevant ones.">+ {% if OPEN_GRAPH_DESCRIPTION %}+ <meta name="description" content="{{ OPEN_GRAPH_DESCRIPTION }}">+ {% else %}+ <meta name="description" content="Zulip combines the immediacy of real-time chat with an email threading model. With Zulip, you can catch up on important conversations while ignoring irrelevant ones.">+ {% endif %}{% else %}-<meta name="robots" content="noindex,nofollow">+ <meta name="robots" content="noindex,nofollow">{% endif %}<!-- Open Graph / Facebook / Twitter Meta Tags -->diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.pyindex f308ad90f37..3d9ba3586de 100644--- a/zerver/tests/test_docs.py+++ b/zerver/tests/test_docs.py@@ -75,7 +75,8 @@ class DocPageTest(ZulipTestCase):for s in landing_missing_strings:self.assertNotIn(s, str(result.content))if not doc_html_str:- self.assert_in_success_response(['<meta name="description" content="Zulip combines'], result)+ # Every page has a meta-description+ self.assert_in_success_response(['<meta name="description" content="'], result)self.assert_not_in_success_response(['<meta name="robots" content="noindex,nofollow">'], result)# Test the URL on the "zephyr" subdomain with the landing page setting