2017-11-29 06:35:28 +01:00
|
|
|
# Documentation systems
|
2016-06-26 19:00:02 +02:00
|
|
|
|
2016-11-16 06:40:00 +01:00
|
|
|
Zulip has three major documentation systems:
|
|
|
|
|
2021-12-17 15:59:58 +01:00
|
|
|
- **Developer and sysadmin documentation**: Documentation for people
|
2016-11-16 06:40:00 +01:00
|
|
|
actually interacting with the Zulip codebase (either by developing
|
|
|
|
it or installing it), and written in Markdown.
|
|
|
|
|
2021-12-17 15:59:58 +01:00
|
|
|
- **Core website documentation**: Complete webpages for complex topics,
|
2016-11-16 06:40:00 +01:00
|
|
|
written in HTML, JavaScript, and CSS (using the Django templating
|
2021-08-20 21:53:28 +02:00
|
|
|
system). These roughly correspond to the documentation someone
|
|
|
|
might look at when deciding whether to use Zulip. We don't expect
|
2016-11-16 06:40:00 +01:00
|
|
|
to ever have more than about 10 pages written using this system.
|
|
|
|
|
2021-12-17 15:59:58 +01:00
|
|
|
- **User-facing documentation**: Our scalable system for documenting
|
2016-11-16 06:40:00 +01:00
|
|
|
Zulip's huge collection of specific features without a lot of
|
2021-08-20 21:53:28 +02:00
|
|
|
overhead or duplicated code/syntax, written in Markdown. We have
|
|
|
|
several hundred pages written using this system. There are 3
|
2019-05-30 00:50:53 +02:00
|
|
|
branches of this documentation:
|
2021-12-17 15:59:58 +01:00
|
|
|
- [Help center documentation](#help-center-documentation)
|
|
|
|
(with a target audience of individual Zulip users)
|
|
|
|
- [Integrations documentation](#integrations-documentation)
|
|
|
|
(with a target audience of IT folks setting up integrations)
|
|
|
|
- [API documentation](#api-documentation) (with a target audience
|
|
|
|
of developers writing code to extend Zulip)
|
2016-11-16 06:40:00 +01:00
|
|
|
|
2017-01-17 06:58:25 +01:00
|
|
|
These three systems are documented in detail.
|
2016-11-16 06:40:00 +01:00
|
|
|
|
|
|
|
## Developer and sysadmin documentation
|
|
|
|
|
|
|
|
What you are reading right now is part of the collection of
|
|
|
|
documentation targeted at developers and people running their own
|
2021-08-20 21:53:28 +02:00
|
|
|
Zulip servers. These docs are written in
|
2023-09-09 10:26:10 +02:00
|
|
|
[CommonMark Markdown](https://commonmark.org/).
|
2016-11-16 06:40:00 +01:00
|
|
|
We've chosen Markdown because it is
|
2021-08-20 21:53:28 +02:00
|
|
|
[easy to write](https://commonmark.org/help/). The source for Zulip's
|
2020-10-23 02:43:28 +02:00
|
|
|
developer documentation is at `docs/` in the Zulip Git repository, and
|
2016-11-16 06:40:00 +01:00
|
|
|
they are served in production at
|
|
|
|
[zulip.readthedocs.io](https://zulip.readthedocs.io/en/latest/).
|
|
|
|
|
2021-09-06 21:39:12 +02:00
|
|
|
This documentation is hosted by the excellent [ReadTheDocs
|
|
|
|
service](https://readthedocs.org/). ReadTheDocs automatically [builds
|
|
|
|
a preview](https://docs.readthedocs.io/en/stable/pull-requests.html)
|
|
|
|
for every pull request, accessible from a "Details" link in the
|
|
|
|
"Checks" section of the pull request page. It's nonetheless valuable
|
|
|
|
to submit a screenshot with any pull request modifying documentation
|
|
|
|
to help make reviews efficient.
|
|
|
|
|
2024-07-04 12:33:43 +02:00
|
|
|
If you want to build the developer documentation locally (e.g., to test
|
2016-11-16 06:40:00 +01:00
|
|
|
your changes), the dependencies are automatically installed as part of
|
2016-06-16 18:25:30 +02:00
|
|
|
Zulip development environment provisioning, and you can build the
|
|
|
|
documentation using:
|
2015-08-21 21:11:24 +02:00
|
|
|
|
2021-08-20 07:09:04 +02:00
|
|
|
```bash
|
2017-06-15 04:15:47 +02:00
|
|
|
./tools/build-docs
|
2016-06-16 18:25:30 +02:00
|
|
|
```
|
2015-08-21 21:11:24 +02:00
|
|
|
|
2017-03-23 19:59:24 +01:00
|
|
|
and then opening `http://127.0.0.1:9991/docs/index.html` in your
|
2021-08-20 21:53:28 +02:00
|
|
|
browser. The raw files are available at
|
2017-03-23 19:59:24 +01:00
|
|
|
`file:///path/to/zulip/docs/_build/html/index.html` in your browser
|
2024-07-09 17:45:31 +02:00
|
|
|
(so you can also use, for example, `firefox docs/_build/html/index.html`
|
|
|
|
from the root of your Zulip checkout).
|
2016-06-26 19:02:10 +02:00
|
|
|
|
2016-11-16 06:40:00 +01:00
|
|
|
If you are adding a new page to the table of contents, you will want
|
2023-09-09 10:26:10 +02:00
|
|
|
to modify `docs/index.md` and run `make clean` before `make html`, so
|
2016-11-16 06:40:00 +01:00
|
|
|
that other docs besides your new one also get the new entry in the
|
|
|
|
table of contents.
|
2016-08-27 17:39:56 +02:00
|
|
|
|
2016-06-16 18:25:30 +02:00
|
|
|
You can also usually test your changes by pushing a branch to GitHub
|
|
|
|
and looking at the content on the GitHub web UI, since GitHub renders
|
2016-11-16 06:40:00 +01:00
|
|
|
Markdown, though that won't be as faithful as the `make html`
|
2021-09-06 21:39:12 +02:00
|
|
|
approach or the preview build.
|
2015-08-18 01:12:38 +02:00
|
|
|
|
2016-06-21 00:31:32 +02:00
|
|
|
When editing dependencies for the Zulip documentation, you should edit
|
2017-11-17 02:41:06 +01:00
|
|
|
`requirements/docs.in` and then run `tools/update-locked-requirements`
|
|
|
|
which updates docs.txt file (which is used by ReadTheDocs to build the
|
2016-11-16 06:40:00 +01:00
|
|
|
Zulip developer documentation, without installing all of Zulip's
|
|
|
|
dependencies).
|
|
|
|
|
|
|
|
## Core website documentation
|
|
|
|
|
|
|
|
Zulip has around 10 HTML documentation pages under `templates/zerver`
|
|
|
|
for specific major topics, like the features list, client apps,
|
2021-08-20 21:53:28 +02:00
|
|
|
integrations, hotkeys, API bindings, etc. These documents often have
|
2016-11-16 06:40:00 +01:00
|
|
|
somewhat complex HTML and JavaScript, without a great deal of common
|
2021-04-13 18:04:31 +02:00
|
|
|
patterns between them other than inheriting from the `portico.html`
|
2021-08-20 21:53:28 +02:00
|
|
|
template. We generally avoid adding new pages to this collection
|
2016-11-16 06:40:00 +01:00
|
|
|
unless there's a good reason, but we don't intend to migrate them,
|
|
|
|
either, since this system gives us the flexibility to express these
|
|
|
|
important elements of the product clearly.
|
|
|
|
|
2021-12-17 15:59:58 +01:00
|
|
|
## User-facing documentation
|
2018-11-28 18:43:30 +01:00
|
|
|
|
|
|
|
All of these systems use a common Markdown-based framework with
|
|
|
|
various extensions for macros and variable interpolation,
|
|
|
|
(`render_markdown_path` in the code), designed to make it convenient
|
|
|
|
to do the things one does a lot in each type of documentation.
|
|
|
|
|
2021-12-17 15:59:58 +01:00
|
|
|
### Help center documentation
|
2018-11-28 18:43:30 +01:00
|
|
|
|
2021-05-08 16:41:40 +02:00
|
|
|
Zulip's [help center](https://zulip.com/help/) documentation is
|
2021-08-20 21:53:28 +02:00
|
|
|
designed to explain how the product works to end users. We aim for
|
2021-05-08 16:41:40 +02:00
|
|
|
this to be clear, concise, correct, and readable to nontechnical
|
2021-12-17 15:59:58 +01:00
|
|
|
audiences where possible.
|
|
|
|
|
2022-01-20 19:49:27 +01:00
|
|
|
See our guide on [writing help center articles](helpcenter.md).
|
2018-11-28 18:43:30 +01:00
|
|
|
|
|
|
|
### Integrations documentation
|
|
|
|
|
2023-03-23 03:47:14 +01:00
|
|
|
Zulip's [integrations documentation](https://zulip.com/integrations/)
|
docs: Add missing space to compound verbs “back up”, “log in”, etc.
Noun: backup, login, logout, lookup, setup.
Verb: back up, log in, log out, look up, set up.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-02-07 20:41:10 +01:00
|
|
|
is user-facing documentation explaining to end users how to set up each
|
2021-08-20 21:53:28 +02:00
|
|
|
of Zulip's more than 100 integrations. There is a detailed [guide on
|
2021-05-08 16:41:40 +02:00
|
|
|
documenting integrations](integrations.md), including style guidelines
|
|
|
|
to ensure that the documentation is high quality and consistent.
|
2018-11-28 18:43:30 +01:00
|
|
|
|
2021-05-08 16:41:40 +02:00
|
|
|
See also our broader [integrations developer
|
|
|
|
guide](https://zulip.com/api/integrations-overview).
|
2021-05-07 02:35:20 +02:00
|
|
|
|
2018-11-28 18:43:30 +01:00
|
|
|
### API documentation
|
|
|
|
|
2021-05-08 16:41:40 +02:00
|
|
|
Zulip's [API documentation](https://zulip.com/api/) is intended to make
|
|
|
|
it easy for a technical user to write automation tools that interact
|
2021-08-20 21:53:28 +02:00
|
|
|
with Zulip. This documentation also serves as our main mechanism for
|
2021-05-08 16:41:40 +02:00
|
|
|
Zulip server developers to communicate with client developers about
|
|
|
|
how the Zulip API works.
|
|
|
|
|
2022-02-24 00:17:21 +01:00
|
|
|
See the [API documentation tutorial](api.md) for
|
2021-05-08 16:41:40 +02:00
|
|
|
details on how to contribute to this documentation.
|
2016-11-16 06:40:00 +01:00
|
|
|
|
2018-11-28 19:04:04 +01:00
|
|
|
## Automated testing
|
|
|
|
|
|
|
|
Zulip has several automated test suites that we run in CI and
|
|
|
|
recommend running locally when making significant edits:
|
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- `tools/lint` catches a number of common mistakes, and we highly
|
2021-08-20 22:54:08 +02:00
|
|
|
recommend
|
2022-02-16 01:39:15 +01:00
|
|
|
[using our linter pre-commit hook](../git/zulip-tools.md#set-up-git-repo-script).
|
2021-08-20 22:54:08 +02:00
|
|
|
See the [main linter doc](../testing/linters.md) for more details.
|
2018-11-28 19:04:04 +01:00
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- The ReadTheDocs docs are built and the links tested by
|
2021-08-20 22:54:08 +02:00
|
|
|
`tools/test-documentation`, which runs `build-docs` and then checks
|
|
|
|
all the links.
|
2018-11-28 19:04:04 +01:00
|
|
|
|
|
|
|
There's an exclude list for the link testing at this horrible path:
|
|
|
|
`tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py`,
|
|
|
|
which is relevant for flaky links.
|
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- The API docs are tested by `tools/test-api`, which does some basic
|
2021-08-20 22:54:08 +02:00
|
|
|
payload verification. Note that this test does not check for broken
|
|
|
|
links (those are checked by `test-help-documentation`).
|
2018-11-28 19:04:04 +01:00
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- `tools/test-help-documentation` checks `/help/`, `/api/`,
|
2020-10-23 02:43:28 +02:00
|
|
|
`/integrations/`, and the core website ("portico") documentation for
|
2021-08-20 21:53:28 +02:00
|
|
|
broken links. Note that the "portico" documentation check has a
|
2018-11-28 19:04:04 +01:00
|
|
|
manually maintained whitelist of pages, so if you add a new page to
|
|
|
|
this site, you will need to edit `PorticoDocumentationSpider` to add it.
|
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- `tools/test-backend test_docs.py` tests various internal details of
|
2021-08-20 21:53:28 +02:00
|
|
|
the variable substitution logic, as well as rendering. It's
|
2018-11-28 19:04:04 +01:00
|
|
|
essential when editing the documentation framework, but not
|
|
|
|
something you'll usually need to interact with when editing
|
|
|
|
documentation.
|