From 78761871a6dc91c6c254a4178bca8e21b2e24570 Mon Sep 17 00:00:00 2001 From: redocly-bot Date: Mon, 9 Oct 2023 16:35:52 +0000 Subject: [PATCH] sync: Synced local 'docs/' with remote 'docs/redoc/' --- docs/deployment/cli.md | 5 +++-- docs/deployment/docker.md | 5 +++-- docs/deployment/html.md | 16 ++++++++-------- docs/deployment/intro.md | 11 ++++++----- docs/deployment/react.md | 7 ++++--- docs/index.md | 4 ++-- docs/quickstart.md | 6 ++---- 7 files changed, 28 insertions(+), 26 deletions(-) diff --git a/docs/deployment/cli.md b/docs/deployment/cli.md index 92769fac..79366887 100644 --- a/docs/deployment/cli.md +++ b/docs/deployment/cli.md @@ -1,7 +1,8 @@ --- title: Use the Redoc CLI -redirectFrom: - - /docs/redoc/quickstart/cli/ +redirects: + '/docs/redoc/quickstart/cli/': + to: '/docs/redoc/deployment/cli/' --- # How to use the Redocly CLI diff --git a/docs/deployment/docker.md b/docs/deployment/docker.md index 09aaf520..c00ee942 100644 --- a/docs/deployment/docker.md +++ b/docs/deployment/docker.md @@ -1,7 +1,8 @@ --- title: Use the Redoc Docker image -redirectFrom: - - /docs/redoc/quickstart/docker/ +redirects: + '/docs/redoc/quickstart/docker/': + to: '/docs/redoc/deployment/docker/' --- # How to use the Redoc Docker image diff --git a/docs/deployment/html.md b/docs/deployment/html.md index 1ac770ed..ed3cd3f2 100644 --- a/docs/deployment/html.md +++ b/docs/deployment/html.md @@ -1,8 +1,10 @@ --- -title: Use Redoc in HTML -redirectFrom: - - /docs/redoc/quickstart/html/ - - /docs/redoc/quickstart/ +title: Use the Redoc HTML element +redirects: + '/docs/redoc/quickstart/html/': + to: '/docs/redoc/deployment/html/' + '/docs/redoc/quickstart/': + to: '/docs/redoc/deployment/html/' --- # Use Redoc in HTML @@ -38,11 +40,9 @@ description. ``` -:::success URL or local file - +{ % admonition type="success" name="URL or local file" % } Set `spec-url` to a relative path if the file is local, e.g. `spec-url=my-api.yaml`. Use a full URL like the example above if it's hosted elsewhere. - -::: +{ % /admonition % } Open the HTML file in your browser to see the HTML documentation rendering. You may want to read the next section and add some configuration to make your documentation your own. diff --git a/docs/deployment/intro.md b/docs/deployment/intro.md index 7db0cd46..baa43996 100644 --- a/docs/deployment/intro.md +++ b/docs/deployment/intro.md @@ -1,7 +1,8 @@ --- title: Redoc deployment guide -redirectFrom: - - /docs/redoc/quickstart/intro/ +redirects: + '/docs/redoc/quickstart/intro/': + to: '/docs/redoc/deployment/intro/' --- # Redoc deployment guide @@ -37,10 +38,10 @@ You need an OpenAPI definition. For testing purposes, you can use one of the fol - [Thingful OpenAPI Definition](https://raw.githubusercontent.com/thingful/openapi-spec/master/spec/swagger.yaml) - [Fitbit Plus OpenAPI Definition](https://raw.githubusercontent.com/TwineHealth/TwineDeveloperDocs/master/spec/swagger.yaml) -:::info OpenAPI specification +{% admonition type="info" name="OpenAPI specification" %} For more information on the OpenAPI specification, refer to the [Learning OpenAPI 3](https://redocly.com/docs/resources/learning-openapi/) section in the documentation. -::: +{% /admonition %} ### How to run Redoc locally @@ -105,7 +106,7 @@ npm install -g http-server Then, `cd` into your project directory and run the following command: ```node -http-server +http - server; ``` The output after entering the command provides the local URL where the preview can be accessed. diff --git a/docs/deployment/react.md b/docs/deployment/react.md index 7c9af0f4..419647df 100644 --- a/docs/deployment/react.md +++ b/docs/deployment/react.md @@ -1,7 +1,8 @@ --- title: Use the Redoc React component -redirectFrom: - - /docs/redoc/quickstart/react/ +redirects: + '/docs/redoc/quickstart/react/': + to: '/docs/redoc/deployment/react/' --- # How to use the Redoc React component @@ -71,7 +72,7 @@ is fully rendered or when an error occurs (with an error as the first argument). ```js { + onLoaded={(error) => { if (!error) { console.log('Yay!'); } diff --git a/docs/index.md b/docs/index.md index ebcdd9de..19e3b1bb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -28,7 +28,7 @@ Redoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, If you have Node installed, quickly generate documentation using `npx`: ``` -npx @redocly/cli build-docs openapi.yaml +npx @redocly/cli build-docs openapi.yaml ``` The tool outputs by default to a file named `redoc-static.html` that you can open in your browser. @@ -56,7 +56,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.mdx), configuration goes in the `redocly.yaml` file, or can be supplied as command line parameters, such as `--theme.openapi.disableSearch`. +* 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 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: diff --git a/docs/quickstart.md b/docs/quickstart.md index 1b01e0f1..ccccbfa5 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -43,12 +43,10 @@ replace the `spec-url` attribute with the URL or local file address to your defi ``` -:::attention Redoc requires an HTTP server to run locally - +{% admonition type="attention" name="Redoc requires an HTTP server to run locally" %} Loading local OpenAPI definitions is impossible without running a web server because of issues with [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) and other security reasons. Refer to [Running Redoc locally](./deployment/intro.md#how-to-run-redoc-locally) for more information. - -::: +{% /admonition %} For a more detailed explanation with step-by-step instructions and additional options for using Redoc, refer to the [Redoc deployment guide](./deployment/intro.md).