Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: align first time user CLI experience with docs #60

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/pages/documentation/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,36 @@ You can find the `zudoku.config.ts` file in the root directory of your project.
It will already be populated with some default options.

## Example
Below is real example that is used to configure the documentation for the Zuplo gateway version of the [Rick & Morty API](https://zudoku.zuplopreview.net/demo?api-url=https://rickandmorty.zuplo.io/openapi.json).
Below is real example that is used to configure the default Zudoku site that `create-zudoku-app` will generate. You can edit this configuration to suit your own needs.

```typescript
import type { ZudokuConfig } from "zudoku";

const config: ZudokuConfig = {
topNavigation: [
{ id: "documentation", label: "Documentation" },
{ id: "api", label: "Rick & Morty API" },
{ id: "api", label: "API Reference" },
],
sidebar: {
documentation: [
{
type: "category",
label: "Get started",
items: ["introduction", "installation"],
label: "Overview",
items: ["example", "other-example"],
},
],
},
redirects: [
{ from: "/", to: "/documentation/introduction" },
{ from: "/documentation", to: "/documentation/introduction" },
{ from: "/", to: "/documentation" }
],
apis: {
type: "url",
input: "https://rickandmorty.zuplo.io/openapi.json",
input: "https://api.example.com/openapi.json", // Enter the URL for your OpenAPI document
//input: "https://rickandmorty.zuplo.io/openapi.json", // ...or, uncomment this line to see an example
navigationId: "api",
},
docs: {
files: "/pages/**/*.mdx",
files: "/pages/**/*.{md,mdx}",
},
};

Expand All @@ -52,7 +52,7 @@ After all, you're here because you built your API using OpenAPI, right?

### OpenAPI URL

If your OpenAPI document is accessible elsewhere via URL you can use this configuration:
If your OpenAPI document is accessible elsewhere via URL you can use this configuration, changing the `input` value to the URL of your own OpenAPI document (you can use the Rick & Morty API document if you want to test and play around):

```json
apis: {
Expand Down