docs: Add syntax highlighting languages to code blocks.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit b29b6f6526)
This commit is contained in:
Anders Kaseorg
2021-08-19 22:09:04 -07:00
parent dbb7bc824c
commit 90bf44bde0
62 changed files with 729 additions and 627 deletions

View File

@@ -101,7 +101,7 @@ defined using a special Markdown extension
(`zerver/openapi/markdown_extension.py`). To use this extension, one
writes a Markdown file block that looks something like this:
```
```md
{start_tabs}
{tab|python}
@@ -169,7 +169,7 @@ an API endpoint supports. You'll see this in files like
directive (implemented in
`zerver/lib/markdown/api_arguments_table_generator.py`):
```
```md
{generate_api_arguments_table|zulip.yaml|/messages/render:post}
```
@@ -186,7 +186,7 @@ You can use the following Markdown directive to render the fixtures
defined in the OpenAPI `zulip.yaml` for a given endpoint and status
code:
```
```md
{generate_code_example|/messages/render:post|fixture(200)}
```

View File

@@ -46,7 +46,7 @@ Usually, this involves a few steps:
If your new integration is an incoming webhook integration, you can generate
the screenshot using `tools/generate-integration-docs-screenshot`:
```sh
```bash
./tools/generate-integration-docs-screenshot --integration integrationname
```
@@ -136,7 +136,7 @@ Here are a few common macros used to document Zulip's integrations:
* `{!webhook-url-with-bot-email.md!}` - Used in certain non-webhook integrations
to generate URLs of the form:
```
```text
https://bot_email:bot_api_key@yourZulipDomain.zulipchat.com/api/v1/external/beanstalk
```

View File

@@ -40,7 +40,7 @@ types of authentication, and configure other settings. Once defined,
information in this section rarely changes.
For example, the `swagger` and `info` objects look like this:
```
```yaml
# Basic Swagger UI info
openapi: 3.0.1
info:
@@ -79,7 +79,7 @@ expects a GET request with one
Basic authentication, and returns a JSON response containing `msg`,
`result`, and `presence` values.
```
```yaml
/users/{user}/presence:
get:
description: Get presence data for another user.
@@ -119,7 +119,7 @@ contains schemas referenced by other objects. For example,
contains three required parameters. Two are strings, and one is an
integer.
```
```yaml
MessageResponse:
type: object
required:
@@ -183,7 +183,7 @@ correct.
### Examples:
```
```yaml
Description: |
This description has multiple lines.
Sometimes descriptions can go on for

View File

@@ -43,7 +43,7 @@ your changes), the dependencies are automatically installed as part of
Zulip development environment provisioning, and you can build the
documentation using:
```
```bash
./tools/build-docs
```

View File

@@ -210,7 +210,7 @@ instructions. For instance, it may address a common problem users may
encounter while following the instructions, or point to an option for power
users.
```
```md
!!! tip ""
If you've forgotten your password, see the
[Change your password](/help/change-your-password) page for
@@ -220,7 +220,7 @@ users.
A **warning** is a note on what happens when there is some kind of problem.
Tips are more common than warnings.
```
```md
!!! warn ""
**Note:** If you attempt to input a nonexistent stream name, an error
message will appear.
@@ -237,14 +237,16 @@ design to easily show the instructions for different
[platforms](https://zulip.com/help/logging-out) in user docs,
languages in API docs, etc. To create a tab switcher, write:
{start_tabs}
{tab|desktop-web}
# First tab's content
{tab|ios}
# Second tab's content
{tab|android}
# Third tab's content
{end_tabs}
```md
{start_tabs}
{tab|desktop-web}
# First tab's content
{tab|ios}
# Second tab's content
{tab|android}
# Third tab's content
{end_tabs}
```
The tab identifiers (e.g. `desktop-web` above) and their mappings to
the tabs' labels are declared in