/api/: Fix some headings.

This commit is contained in:
Tim Abbott 2017-11-08 13:08:23 -08:00
parent d2e55fa5c8
commit a8c735e1d2
3 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
## API
## REST API
* [Installation instructions](/api-new/installation-instructions)
* [API keys](/api-new/api-keys)

View File

@ -16,6 +16,9 @@
{% if page_is_help_center %}
<div class="light"> <pipe>|</pipe> User Documentation</div>
{% endif %}
{% if page_is_api_center %}
<div class="light"> <pipe>|</pipe> API Documentation</div>
{% endif %}
</a>
{% endif %}
</div>

View File

@ -70,7 +70,10 @@ class MarkdownDirectoryView(ApiURLView):
# For disabling the "Back to home" on the homepage
context["not_index_page"] = not path.endswith("/index.md")
context["page_is_help_center"] = True
if self.template_name == "zerver/help/main.html":
context["page_is_help_center"] = True
else:
context["page_is_api_center"] = True
# An "article" might require the api_uri_context to be rendered
api_uri_context = {} # type: Dict[str, Any]
add_api_uri_context(api_uri_context, self.request)