From 80a6b12690fc664a724d0a8ced3960431f3ccabb Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 14 Feb 2024 17:42:15 -0800 Subject: [PATCH] docs: Optimize /api links to skip trailing slash redirect. Signed-off-by: Anders Kaseorg --- docs/documentation/api.md | 2 +- docs/outreach/gsoc.md | 2 +- docs/overview/architecture-overview.md | 2 +- docs/tutorials/writing-views.md | 2 +- help/change-organization-url.md | 2 +- help/demo-organizations.md | 2 +- help/guest-users.md | 2 +- help/restrict-name-and-email-changes.md | 2 +- templates/corporate/for/business.html | 2 +- templates/corporate/for/open-source.html | 2 +- templates/corporate/self-hosting.html | 2 +- templates/zerver/integrations/capistrano.md | 2 +- templates/zerver/integrations/jenkins.md | 2 +- web/templates/gear_menu_popover.hbs | 2 +- web/templates/settings/bot_settings.hbs | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/documentation/api.md b/docs/documentation/api.md index 05f50624c7..147c7a0930 100644 --- a/docs/documentation/api.md +++ b/docs/documentation/api.md @@ -327,7 +327,7 @@ above. match the title of the endpoint from the OpenAPI `summary` field. 1. Test your endpoint, pretending to be a new user in a hurry, by - visiting it via the links on `http://localhost:9991/api` (the API + visiting it via the links on `http://localhost:9991/api/` (the API docs are rendered from the Markdown source files on page load, so just reload to see an updated version as you edit). You should make sure that copy-pasting the code in your examples works, and diff --git a/docs/outreach/gsoc.md b/docs/outreach/gsoc.md index 92c4562152..45638d3214 100644 --- a/docs/outreach/gsoc.md +++ b/docs/outreach/gsoc.md @@ -215,7 +215,7 @@ Django, TypeScript/JavaScript, and CSS. Experts: Tim Abbott, Prakhar Pratyush -- Zulip's [**REST API documentation**](https://zulip.com/api), which is an +- Zulip's [**REST API documentation**](https://zulip.com/api/), which is an important resource for any organization integrating with Zulip, as well as the developers of our API clients. Zulip has a [nice framework](../documentation/api.md) for writing API documentation diff --git a/docs/overview/architecture-overview.md b/docs/overview/architecture-overview.md index edc23bd36c..654b281879 100644 --- a/docs/overview/architecture-overview.md +++ b/docs/overview/architecture-overview.md @@ -44,7 +44,7 @@ team to tens of thousands of users. It has [hundreds of features](https://zulip.com/features/) both large and small, and supports dedicated apps for iOS, Android, Linux, Windows, and macOS, all modern web browsers, several cross-protocol chat clients, and -numerous dedicated [Zulip API](https://zulip.com/api) clients +numerous dedicated [Zulip API](https://zulip.com/api/) clients (e.g., bots). A server can host multiple Zulip _realms_ (organizations), each on its diff --git a/docs/tutorials/writing-views.md b/docs/tutorials/writing-views.md index 05cd1d926d..c3bcd56056 100644 --- a/docs/tutorials/writing-views.md +++ b/docs/tutorials/writing-views.md @@ -316,7 +316,7 @@ r = requests.patch(SERVER_URL + 'api/v1/realm', ``` This is simply an illustration; we recommend making use of the [Zulip -Python API bindings](https://www.zulipchat.com/api) since they provide +Python API bindings](https://zulip.com/api/) since they provide a nice interface for accessing the API. ## Legacy endpoints used by the web client diff --git a/help/change-organization-url.md b/help/change-organization-url.md index ff5aa3d975..7b65a6ac18 100644 --- a/help/change-organization-url.md +++ b/help/change-organization-url.md @@ -5,7 +5,7 @@ organization URL is a disruptive operation for users: * Users will be logged out of existing sessions on the web, mobile and desktop apps and need to log in again. -* Any [API clients](/api) or [integrations](/integrations/) will need +* Any [API clients](/api/) or [integrations](/integrations/) will need to be updated to point to the new organization URL. We recommend using a [wildcard diff --git a/help/demo-organizations.md b/help/demo-organizations.md index 5f7469f44b..e4df8c505e 100644 --- a/help/demo-organizations.md +++ b/help/demo-organizations.md @@ -73,7 +73,7 @@ permanent organization: * Users will be logged out of existing sessions on the web, mobile and desktop apps and need to log in again. -* Any [API clients](/api) or [integrations](/integrations/) will need +* Any [API clients](/api/) or [integrations](/integrations/) will need to be updated to point to the new organization URL. {start_tabs} diff --git a/help/guest-users.md b/help/guest-users.md index eb4b1d84c5..21498f6d95 100644 --- a/help/guest-users.md +++ b/help/guest-users.md @@ -72,7 +72,7 @@ In practice, guests should rarely encounter content from an **Unknown user**, unless users in your organization frequently change their stream subscriptions or are [deactivated](/help/deactivate-or-reactivate-a-user). -The only information guests can access about unknown users via the [API](/api) +The only information guests can access about unknown users via the [API](/api/) is which user IDs exist, and [availability](/help/status-and-availability) updates for each user ID. diff --git a/help/restrict-name-and-email-changes.md b/help/restrict-name-and-email-changes.md index f2bf20f590..9475be0ccc 100644 --- a/help/restrict-name-and-email-changes.md +++ b/help/restrict-name-and-email-changes.md @@ -7,7 +7,7 @@ By default, any user can [change their name](/help/change-your-name). You can instead prevent users from changing their name. This setting is especially useful if user names are managed via an external source, and -synced into Zulip via the [Zulip API](/api), [LDAP][ldap-sync-data] or +synced into Zulip via the [Zulip API](/api/), [LDAP][ldap-sync-data] or another method. !!! tip "" diff --git a/templates/corporate/for/business.html b/templates/corporate/for/business.html index b1f81df5b6..a7b285dd76 100644 --- a/templates/corporate/for/business.html +++ b/templates/corporate/for/business.html @@ -282,7 +282,7 @@
  • Build your own integrations with Zulip’s - easy-to-use RESTful + easy-to-use RESTful API, client bindings, incoming webhooks, outgoing diff --git a/templates/corporate/self-hosting.html b/templates/corporate/self-hosting.html index 00c57c5e43..893f2b76ec 100644 --- a/templates/corporate/self-hosting.html +++ b/templates/corporate/self-hosting.html @@ -238,7 +238,7 @@

    Creating custom integrations is a breeze with - our well-documented REST API. + our well-documented REST API.

    Zulip makes it easy to diff --git a/templates/zerver/integrations/capistrano.md b/templates/zerver/integrations/capistrano.md index fb16384291..a97ed53eb0 100644 --- a/templates/zerver/integrations/capistrano.md +++ b/templates/zerver/integrations/capistrano.md @@ -22,7 +22,7 @@ Get Zulip notifications for your Capistrano deploys! The `--user` and `--api-key` should be the email and API key of the Zulip bot created above. You can also put these values in a `~/.zuliprc` file on - your Capistrano machine. See our [API docs](/api) for instructions on + your Capistrano machine. See our [API docs](/api/) for instructions on creating that file. !!! tip "" diff --git a/templates/zerver/integrations/jenkins.md b/templates/zerver/integrations/jenkins.md index 2dec12a828..11cd376f66 100644 --- a/templates/zerver/integrations/jenkins.md +++ b/templates/zerver/integrations/jenkins.md @@ -53,7 +53,7 @@ To learn more, see the [plugin's README](https://github.com/jenkinsci/zulip-plug If not, create the stream and make sure you're subscribed to it. 1. Are your API key and email address correct? Test them - using [our curl API](/api). + using [our curl API](/api/). 1. Configure a Jenkins log recorder for **jenkins.plugins.zulip** and check why your messages fail to send. diff --git a/web/templates/gear_menu_popover.hbs b/web/templates/gear_menu_popover.hbs index 52f30f01cb..5edcd5cc30 100644 --- a/web/templates/gear_menu_popover.hbs +++ b/web/templates/gear_menu_popover.hbs @@ -115,7 +115,7 @@

  • diff --git a/web/templates/settings/bot_settings.hbs b/web/templates/settings/bot_settings.hbs index 711600c3db..fe3eb34e9d 100644 --- a/web/templates/settings/bot_settings.hbs +++ b/web/templates/settings/bot_settings.hbs @@ -5,7 +5,7 @@ {{#tr}} Looking for our integrations or API documentation? {{#*inline "z-integrations"}}{{> @partial-block}}{{/inline}} - {{#*inline "z-api"}}{{> @partial-block}}{{/inline}} + {{#*inline "z-api"}}{{> @partial-block}}{{/inline}} {{/tr}}