mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
docs: Improve sections of the "Documenting an integration" doc.
This commit generally improves the formatting and phrasing in certain sections of the page, and is kept separate to distinguish these changes from the content-related doc updates in the upcoming commits. Co-authored-by: Lauryn Menard <lauryn@zulip.com>
This commit is contained in:
@@ -28,34 +28,36 @@ Typically, the documentation process involves the following steps:
|
|||||||
Zulip's pre-defined Markdown macros can be used for some of these steps.
|
Zulip's pre-defined Markdown macros can be used for some of these steps.
|
||||||
See [Markdown macros](#markdown-macros) for further details.
|
See [Markdown macros](#markdown-macros) for further details.
|
||||||
|
|
||||||
- Make sure you've added your integration to
|
- Make sure you've added your integration to `zerver/lib/integrations.py` in
|
||||||
`zerver/lib/integrations.py` in both the `WEBHOOK_INTEGRATIONS`
|
both the `WEBHOOK_INTEGRATIONS` section (or `INTEGRATIONS` if not a
|
||||||
section (or `INTEGRATIONS` if not a webhook), and the
|
webhook), and the `DOC_SCREENSHOT_CONFIG` sections.
|
||||||
`DOC_SCREENSHOT_CONFIG` sections. These registries configure your
|
|
||||||
integration to appear on the `/integrations` page and make it
|
|
||||||
possible to automatically generate the screenshot of a sample
|
|
||||||
message (which is important for the screenshots to be updated as
|
|
||||||
Zulip's design changes).
|
|
||||||
|
|
||||||
- You'll need to add an SVG graphic
|
These registries configure your integration to appear on the
|
||||||
of your integration's logo under the
|
`/integrations` page, and make it possible to automatically generate the
|
||||||
|
screenshot of an example message, which is important for the screenshots
|
||||||
|
to be updated as Zulip's design changes.
|
||||||
|
|
||||||
|
- You'll need to add an SVG graphic of your integration's logo under the
|
||||||
`static/images/integrations/logos/<name>.svg`, where `<name>` is the
|
`static/images/integrations/logos/<name>.svg`, where `<name>` is the
|
||||||
name of the integration, all in lower case; you can usually find them in the
|
name of the integration, all in lower case; you can usually find them in the
|
||||||
product branding or press page. Make sure to optimize the SVG graphic by
|
product branding or press page. Make sure to optimize the SVG graphic by
|
||||||
running `tools/setup/optimize-svg`. This will also run
|
running `tools/setup/optimize-svg`. This will also run
|
||||||
`tools/setup/generate_integration_bots_avatars.py` automatically to generate
|
`tools/setup/generate_integration_bots_avatars.py` automatically to generate
|
||||||
a smaller version of the image you just added and optimized. This smaller image will be
|
a smaller version of the image you just added and optimized. This smaller
|
||||||
used as the bot avatar in the documentation screenshot that will be generated
|
image will be used as the bot avatar in the documentation screenshot that
|
||||||
in the next step.
|
will be generated in the next step.
|
||||||
|
|
||||||
If you cannot find an SVG graphic of the logo, please find and include a PNG
|
If you cannot find an SVG graphic of the logo, please find and include a PNG
|
||||||
image of the logo instead.
|
image of the logo instead.
|
||||||
|
|
||||||
- Finally, generate a message sent by the integration and take a screenshot of
|
- Finally, you will need to generate a message sent by the integration, and
|
||||||
the message to provide an example message in the documentation.
|
generate a screenshot of the message to provide an example message in the
|
||||||
|
integration's documentation.
|
||||||
|
|
||||||
If your new integration is an incoming webhook integration, you can generate
|
If your new integration is an incoming webhook integration, you can
|
||||||
the screenshot using `tools/screenshots/generate-integration-docs-screenshot`:
|
generate the screenshot using
|
||||||
|
`tools/screenshots/generate-integration-docs-screenshot`, where
|
||||||
|
`integrationname` is the name of the integration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./tools/screenshots/generate-integration-docs-screenshot --integration integrationname
|
./tools/screenshots/generate-integration-docs-screenshot --integration integrationname
|
||||||
|
|||||||
Reference in New Issue
Block a user