web: Save a 301 redirect from /help to /help/.

This commit is contained in:
Alex Vandiver 2023-03-23 03:51:28 +00:00 committed by Tim Abbott
parent 6f4d22762c
commit 164d58bec9
8 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
Welcome! Zulip's documentation is split into four parts: Welcome! Zulip's documentation is split into four parts:
- [Help center documentation](https://zulip.com/help), for users and - [Help center documentation](https://zulip.com/help/), for users and
administrators of Zulip organizations. administrators of Zulip organizations.
- [Installation documentation](production/install.md), for - [Installation documentation](production/install.md), for
installing and maintaining a production self-hosted Zulip installation. installing and maintaining a production self-hosted Zulip installation.

View File

@ -56,7 +56,7 @@ administrators of an organization have a great deal of control over
who can register an account, what permissions new users have, etc. For who can register an account, what permissions new users have, etc. For
more on security considerations and options, see [the security model more on security considerations and options, see [the security model
section](../production/security-model.md) and the [Zulip Help section](../production/security-model.md) and the [Zulip Help
Center](https://zulip.com/help). Center](https://zulip.com/help/).
## Components ## Components

View File

@ -13,7 +13,7 @@ principles are important in how we think about internationalization:
tagged for translation in both [HTML templates](#html-templates) and tagged for translation in both [HTML templates](#html-templates) and
code, and our linters attempt to enforce this. There are some code, and our linters attempt to enforce this. There are some
exceptions: we don't tag strings in Zulip's landing pages exceptions: we don't tag strings in Zulip's landing pages
(e.g. /features/) and other documentation (e.g. /help) for (e.g. /features/) and other documentation (e.g. /help/) for
translation at this time (though we do aim for those pages to be translation at this time (though we do aim for those pages to be
usable with tools like Google Translate). usable with tools like Google Translate).
- Translating all the strings in Zulip for a language and maintaining - Translating all the strings in Zulip for a language and maintaining

View File

@ -38,7 +38,7 @@
</h3> </h3>
<ul> <ul>
<li><a href="/help/getting-started-with-zulip">{{ _("Getting started") }}</a></li> <li><a href="/help/getting-started-with-zulip">{{ _("Getting started") }}</a></li>
<li><a href="/help">{{ _("Help center") }}</a></li> <li><a href="/help/">{{ _("Help center") }}</a></li>
<li><a href="/development-community/" target="_blank">{{ _("Community chat") }}</a></li> <li><a href="/development-community/" target="_blank">{{ _("Community chat") }}</a></li>
<li class="extra_margin"><a href="/help/contact-support">{{ _("Contact support") }}</a></li> <li class="extra_margin"><a href="/help/contact-support">{{ _("Contact support") }}</a></li>
<li> <li>
@ -106,7 +106,7 @@
{% endif %} {% endif %}
<div class="footer__legal-spacer"></div> <div class="footer__legal-spacer"></div>
{% if not corporate_enabled %} {% if not corporate_enabled %}
<a href="/help">{{ _("Help center") }}</a> <a href="/help/">{{ _("Help center") }}</a>
{% endif %} {% endif %}
<a href="{{ root_domain_uri }}/policies/terms">{{ _("Terms of Service") }}</a> <a href="{{ root_domain_uri }}/policies/terms">{{ _("Terms of Service") }}</a>
<a href="{{ root_domain_uri }}/policies/privacy">{{ _("Privacy policy") }}</a> <a href="{{ root_domain_uri }}/policies/privacy">{{ _("Privacy policy") }}</a>

View File

@ -110,7 +110,7 @@
<a href="/help/getting-started-with-zulip">Getting started</a> <a href="/help/getting-started-with-zulip">Getting started</a>
</li> </li>
<li> <li>
<a href="/help">Help center</a> <a href="/help/">Help center</a>
</li> </li>
<li> <li>
<a href="https://zulip.com/development-community/" target="_blank" rel="noopener noreferrer"> <a href="https://zulip.com/development-community/" target="_blank" rel="noopener noreferrer">

View File

@ -41,7 +41,7 @@ class UnusedImagesLinterSpider(BaseDocumentationSpider):
class HelpDocumentationSpider(UnusedImagesLinterSpider): class HelpDocumentationSpider(UnusedImagesLinterSpider):
name = "help_documentation_crawler" name = "help_documentation_crawler"
start_urls = ["http://localhost:9981/help"] start_urls = ["http://localhost:9981/help/"]
deny_domains: List[str] = [] deny_domains: List[str] = []
deny = ["/policies/privacy"] deny = ["/policies/privacy"]
images_path = "static/images/help" images_path = "static/images/help"
@ -58,7 +58,7 @@ class PorticoDocumentationSpider(BaseDocumentationSpider):
def _is_external_url(self, url: str) -> bool: def _is_external_url(self, url: str) -> bool:
return ( return (
not url.startswith("http://localhost:9981") not url.startswith("http://localhost:9981")
or url.startswith(("http://localhost:9981/help", "http://localhost:9981/api")) or url.startswith(("http://localhost:9981/help/", "http://localhost:9981/api"))
or self._has_extension(url) or self._has_extension(url)
) )

View File

@ -84,7 +84,7 @@
</li> </li>
<li class="divider" role="presentation"></li> <li class="divider" role="presentation"></li>
<li role="presentation"> <li role="presentation">
<a href="/help" target="_blank" rel="noopener noreferrer" role="menuitem"> <a href="/help/" target="_blank" rel="noopener noreferrer" role="menuitem">
<i class="fa fa-question-circle" aria-hidden="true"></i> {{t 'Help center' }} <i class="fa fa-question-circle" aria-hidden="true"></i> {{t 'Help center' }}
</a> </a>
</li> </li>

View File

@ -74,7 +74,7 @@ class PublicURLTest(ZulipTestCase):
# Add all files in help documentation directory (except for 'index.md', # Add all files in help documentation directory (except for 'index.md',
# 'missing.md' and `help/include/` files) to `get_urls['200']` list. # 'missing.md' and `help/include/` files) to `get_urls['200']` list.
for doc in os.listdir("./help"): for doc in os.listdir("./help/"):
if doc.startswith(".") or "~" in doc or "#" in doc: if doc.startswith(".") or "~" in doc or "#" in doc:
continue # nocoverage -- just here for convenience continue # nocoverage -- just here for convenience
if doc not in {"index.md", "include", "missing.md"}: if doc not in {"index.md", "include", "missing.md"}: