From 3ae251b7e4087091c7837a5cb8bb2914bb8d0eeb Mon Sep 17 00:00:00 2001 From: Andrew Tatomyr Date: Tue, 20 May 2025 20:47:37 +0300 Subject: [PATCH] docs: remove deprecated CLI commands from docs (#2691) --- docs/deployment/cli.md | 8 ++++---- docs/deployment/intro.md | 28 ---------------------------- docs/index.md | 6 +++--- 3 files changed, 7 insertions(+), 35 deletions(-) diff --git a/docs/deployment/cli.md b/docs/deployment/cli.md index 86b82758..f1b3a1ac 100644 --- a/docs/deployment/cli.md +++ b/docs/deployment/cli.md @@ -12,9 +12,9 @@ With Redocly CLI, you can bundle your OpenAPI definition and API documentation First, you need to install the `@redocly/cli` package. -You can install it [globally](../../cli/installation.md#install-globally) using npm or Yarn. +You can install it [globally](../../cli/installation#install-globally) using npm. -Or you can install it during [runtime](../../cli/installation.md#use-npx-at-runtime) using npx or Docker. +Or you can install it during [runtime](../../cli/installation#use-npx-at-runtime) using npx or Docker. ## Step 2 - Build the HTML file @@ -27,9 +27,9 @@ replacing `apis/openapi.yaml` with your API definition file's name and path: redocly build-docs apis/openapi.yaml ``` -See the [build-docs](../../cli/commands/build-docs.md) documentation for more information +See the [build-docs](../../cli/commands/build-docs) documentation for more information on the different options and ways you can use the command. -Also, check out [Redocly CLI commands](../../cli/commands/index.md), for more +Also, check out [Redocly CLI commands](../../cli/commands), for more information on the different things you can do with Redocly CLI including linting, splitting, and bundling your API definition file. diff --git a/docs/deployment/intro.md b/docs/deployment/intro.md index e80b0a0d..55f69d48 100644 --- a/docs/deployment/intro.md +++ b/docs/deployment/intro.md @@ -45,34 +45,6 @@ section in the documentation. If you want to view your Redoc output locally, you can simulate an HTTP server. -#### Redocly CLI - -Redocly CLI is an open source command-line tool that includes a command -for simulating an HTTP server to provide a preview of your OpenAPI definition locally. - -If you have [Redocly CLI](https://redocly.com/docs/cli/#installation-and-usage) installed, `cd` into your -project directory and run the following command: - -```bash -redocly preview-docs openapi.yaml -``` - -Replace `openapi.yaml` in the example command with the file path to your OpenAPI definition. - -By default, without providing a port, the preview starts on port 8080, and can be accessed at `http://localhost:8080`. -To exit the preview, use `control+C`. - -You can alter the port if you are using 8080 already, for example: - -```bash -redocly preview-docs -p 8888 openapi.yaml -``` - -Replace `openapi.yaml` in the example command with the file path to your OpenAPI definition. - -For more information about the `preview-docs` command, refer to -[Redocly CLI commands](https://redocly.com/docs/cli/commands/preview-docs/#preview-docs) in the Redocly CLI documentation. - #### Python If you have [Python 3](https://www.python.org/downloads/) installed, `cd` into your diff --git a/docs/index.md b/docs/index.md index 6e2716e8..246dcf05 100644 --- a/docs/index.md +++ b/docs/index.md @@ -57,7 +57,7 @@ Check out the [deployment documentation](./deployment/intro.md) for more options Redoc is highly configurable. Each deployment option accepts configuration in a way that's appropriate to that platform, but the options are the same for each. For example: -* Using [Redocly CLI](../cli/index.md), configuration goes in the `redocly.yaml` file, or can be supplied as command line parameters, such as `--theme.openapi.disableSearch`. +* Using [Redocly CLI](../cli), configuration goes in the `redocly.yaml` file, or can be supplied as command line parameters, such as `--theme.openapi.disableSearch`. * Using HTML or React, configure by setting `option` in the tag. Here's a sample `redocly.yaml` configuration file, showing a few common settings and tweaking some of the visual theme settings: @@ -85,13 +85,13 @@ theme: Redocly CLI detects a file named `redocly.yaml` in the same directory as you run the command and uses it. See the documentation with a command like this: ```sh -redocly preview-docs openapi.yaml +redocly build-docs openapi.yaml ``` There are many, many more options available. Visit the [configuration reference](./config.md) for a complete list. ## Next steps -* If you are new to OpenAPI, try the [OpenAPI starter project](../cli/openapi-starter.md) for a great introduction. +* If you are new to OpenAPI, try the [OpenAPI starter project](../cli/openapi-starter) for a great introduction. * Ready to build documentation from an existing OpenAPI file? Go to the [Redoc quickstart](./quickstart.md) and get started. * Learn more about the project by visiting [Redoc on GitHub](https://github.com/Redocly/redoc).