docs: Fix formatting of integration-docs-guide.md

This commit is contained in:
derAnfaenger 2017-11-22 17:33:52 +01:00 committed by Tim Abbott
parent 43484ad494
commit a1d255471c
1 changed files with 98 additions and 79 deletions

View File

@ -70,16 +70,19 @@ Here are a few common macros used to document Zulip's integrations:
* **Contents:** * **Contents:**
See [source][1]. See [source][1].
**Note:** `{{ integration_display_name }}` is replaced by **Note:** `{{ integration_display_name }}` is replaced by
[Integration.display_name][2] and `{{ recommended_stream_name }}` [Integration.display_name][2] and `{{ recommended_stream_name }}`
is replaced by [Integration.stream_name][3]. is replaced by [Integration.stream_name][3].
* **Example usage:** * **Example usage:**
``` ```
{!create-stream.md!} {!create-stream.md!}
``` ```
* **Example rendering:** * **Example rendering:**
```text ```text
First, create the stream you would like to use for GitLab notifications, First, create the stream you would like to use for GitLab notifications,
and subscribe all interested parties to this stream. We recommend the and subscribe all interested parties to this stream. We recommend the
@ -97,7 +100,9 @@ Here are a few common macros used to document Zulip's integrations:
generated automatically for every webhook by using attributes in the generated automatically for every webhook by using attributes in the
[WebhookIntegration][4] class. [WebhookIntegration][4] class.
* **Contents:** See [source][5]. **Note:** If special configuration is * **Contents:** See [source][5].
**Note:** If special configuration is
required to set up the URL and you can't use this macro, be sure to use the required to set up the URL and you can't use this macro, be sure to use the
`{{ api_url }}` template variable, so that your integration `{{ api_url }}` template variable, so that your integration
documentation will provide the correct URL for whatever server it is documentation will provide the correct URL for whatever server it is
@ -105,13 +110,15 @@ Here are a few common macros used to document Zulip's integrations:
variable, you should document that too. variable, you should document that too.
* **Example usage:** * **Example usage:**
``` ```
{!create-bot-construct-url.md!} {!create-bot-construct-url.md!}
``` ```
Usually used right after `{!create-stream!}`. Usually used right after `{!create-stream!}`.
* **Example rendering:** * **Example rendering:**
```
```text
Next, on your Zulip settings page, create a bot for GitLab. Construct Next, on your Zulip settings page, create a bot for GitLab. Construct
the URL for the GitLab bot using the bot API key and stream name: the URL for the GitLab bot using the bot API key and stream name:
@ -130,11 +137,13 @@ Here are a few common macros used to document Zulip's integrations:
* **Contents:** See [source][6]. * **Contents:** See [source][6].
* **Example usage:** Usually used right after `{!create-bot-construct-url.md!}`. * **Example usage:** Usually used right after `{!create-bot-construct-url.md!}`.
``` ```
{!append-stream-name.md!} {!append-stream-name.md!}
``` ```
* **Example rendering:** * **Example rendering:**
``` ```
To specify the stream, you must explicitly append To specify the stream, you must explicitly append
`&stream=stream_name` to the end of the above URL, where `&stream=stream_name` to the end of the above URL, where
@ -149,11 +158,13 @@ Here are a few common macros used to document Zulip's integrations:
* **Contents:** See [source][7]. * **Contents:** See [source][7].
* **Example usage:** Usually used right after `{!create-bot-construct-url.md!}`. * **Example usage:** Usually used right after `{!create-bot-construct-url.md!}`.
``` ```
{!append-topic.md!} {!append-topic.md!}
``` ```
* **Example rendering:** * **Example rendering:**
``` ```
To change the topic used by the bot, simply append `&topic=name` To change the topic used by the bot, simply append `&topic=name`
to the end of the above URL, where `name` is your topic. to the end of the above URL, where `name` is your topic.
@ -168,11 +179,13 @@ Here are a few common macros used to document Zulip's integrations:
* **Example usage:** Usually used at the end of the documentation, right * **Example usage:** Usually used at the end of the documentation, right
before the sample message screenshot. before the sample message screenshot.
``` ```
{!congrats.md!} {!congrats.md!}
``` ```
* **Example rendering:** * **Example rendering:**
``` ```
**Congratulations! You're done!** **Congratulations! You're done!**
@ -188,11 +201,13 @@ Here are a few common macros used to document Zulip's integrations:
* **Example usage:** Currently mostly used in non-webhook integrations docs * **Example usage:** Currently mostly used in non-webhook integrations docs
under `templates/zerver/integrations/<integration_name>.md`. under `templates/zerver/integrations/<integration_name>.md`.
``` ```
{!download-python-bindings.md!} {!download-python-bindings.md!}
``` ```
* **Example rendering:** * **Example rendering:**
``` text ``` text
Download and install our [Python bindings and example scripts](/api) Download and install our [Python bindings and example scripts](/api)
on the server where the IntegrationName bot will live. on the server where the IntegrationName bot will live.
@ -207,11 +222,13 @@ Here are a few common macros used to document Zulip's integrations:
* **Example usage:** Usually used in non-webhook integration docs under * **Example usage:** Usually used in non-webhook integration docs under
`templates/zerver/integrations/<integration_name>.md`. `templates/zerver/integrations/<integration_name>.md`.
``` ```
{!change-zulip-config-file.md!} {!change-zulip-config-file.md!}
``` ```
* **Example rendering:** * **Example rendering:**
``` ```
On your Zulip settings page, create a bot for Codebase. On your Zulip settings page, create a bot for Codebase.
@ -233,6 +250,7 @@ Here are a few common macros used to document Zulip's integrations:
[git-webhook-url-with-branches][13]. [git-webhook-url-with-branches][13].
* **Example usage:** Used exclusively in Git integrations. * **Example usage:** Used exclusively in Git integrations.
``` ```
{!git-append-branches.md!} {!git-append-branches.md!}
{!git-webhook-url-with-branches.md!} {!git-webhook-url-with-branches.md!}
@ -249,6 +267,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 * `{!webhook-url-with-bot-email.md!}` - Used in certain non-webhook integrations
to generate URLs of the form (see [source][14]): to generate URLs of the form (see [source][14]):
``` ```
https://bot_email:bot_api_key@yourZulipDomain.zulipchat.com/api/v1/external/beanstalk https://bot_email:bot_api_key@yourZulipDomain.zulipchat.com/api/v1/external/beanstalk
``` ```