From 5ef09bfcd41b6469be33ef950d0c1df43d288710 Mon Sep 17 00:00:00 2001 From: derAnfaenger Date: Wed, 15 Nov 2017 11:49:15 +0100 Subject: [PATCH] docs: Move bot docs to /api. With a few fixes for rendering bugs. The rest will be in a follow-up issue. --- docs/index.rst | 2 -- .../zerver/api/running-bots.md | 12 ++++++------ templates/zerver/api/sidebar.md | 4 ++-- .../zerver/api/writing-bots.md | 3 ++- tools/linter_lib/custom_check.py | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) rename docs/running-bots-guide.md => templates/zerver/api/running-bots.md (96%) rename docs/writing-bots-guide.md => templates/zerver/api/writing-bots.md (99%) diff --git a/docs/index.rst b/docs/index.rst index 2d6a173d83..ad717ccc9a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -82,8 +82,6 @@ Contents: integration-guide integration-docs-guide webhook-walkthrough - running-bots-guide - writing-bots-guide new-feature-tutorial writing-views life-of-a-request diff --git a/docs/running-bots-guide.md b/templates/zerver/api/running-bots.md similarity index 96% rename from docs/running-bots-guide.md rename to templates/zerver/api/running-bots.md index f0357bbf37..c715fda3bc 100644 --- a/docs/running-bots-guide.md +++ b/templates/zerver/api/running-bots.md @@ -22,7 +22,7 @@ https://github.com/zulip/python-zulip-api/tree/master/zulip_bots/zulip_bots/bots in your Zulip organization. *Hint: Looking for an easy way to test a bot's output? Check out [this]( - writing-bots-guide.html#testing-a-bot-s-output) guide.* + writing-bots#testing-a-bots-output) guide.* You need: @@ -38,10 +38,10 @@ You need: 1. Run `pip install zulip_bots` to install the package. -*Hint: Do you want to install the latest development version? Check - out [this]( - writing-bots-guide.html#installing-a-development-version-of-the-zulip-bots-package) - guide.* + *Hint: Do you want to install the latest development version? Check + out [this]( + writing-bots#installing-a-development-version-of-the-zulip-bots-package) + guide.* 2. Register a new bot user on the Zulip server's web interface. @@ -54,7 +54,7 @@ You need: * In the *Active bots* panel, click on the little green download icon to download its configuration file *.zuliprc* (the structure of this file is - explained [here](writing-bots-guide.html#configuration-file)). + explained [here](writing-bots#configuration-file)). * Copy the file to a destination of your choice, e.g. to `~/.zuliprc`. 4. Run the bot. diff --git a/templates/zerver/api/sidebar.md b/templates/zerver/api/sidebar.md index 3d08866dc9..7a9b3d62f2 100644 --- a/templates/zerver/api/sidebar.md +++ b/templates/zerver/api/sidebar.md @@ -17,5 +17,5 @@ ## Interactive bots (experimental) -* [Running bots](https://zulip.readthedocs.io/en/latest/running-bots-guide.html) -* [Writing bots](https://zulip.readthedocs.io/en/latest/writing-bots-guide.html) +* [Running bots](/api/running-bots) +* [Writing bots](/api/writing-bots) diff --git a/docs/writing-bots-guide.md b/templates/zerver/api/writing-bots.md similarity index 99% rename from docs/writing-bots-guide.md rename to templates/zerver/api/writing-bots.md index c2ffa75c4e..68bcc37bec 100644 --- a/docs/writing-bots-guide.md +++ b/templates/zerver/api/writing-bots.md @@ -12,9 +12,10 @@ third-party service. * This guide is about writing and testing interactive bots. We assume familiarity with our - [guide for running bots](running-bots-guide.html). + [guide for running bots](running-bots). On this page you'll find: + * A step-by-step [guide](#installing-a-development-version-of-the-zulip-bots-package) on how to set up a development environment for writing bots with all diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index e64e9f5ff9..8773eee741 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -651,7 +651,7 @@ def build_custom_checkers(by_lang): color = next(colors) markdown_docs_length_exclude = { "api/bots/converter/readme.md", - "docs/running-bots-guide.md", + "templates/zerver/api/running-bots.md", "docs/dev-env-first-time-contributors.md", "docs/webhook-walkthrough.md", "docs/life-of-a-request.md",