Skip to content

Commit 5960427

Browse files
authored
Update and sync examples + logos (#17)
1 parent 96aa481 commit 5960427

File tree

16 files changed

+70
-140
lines changed

16 files changed

+70
-140
lines changed

examples/with-auth0/navigation.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

examples/with-auth0/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"useUnknownInCatchVariables": false,
1313
"jsx": "react-jsx"
1414
},
15-
"include": ["src", "zudoku.config.ts", "navigation.ts"]
15+
"include": ["src", "zudoku.config.ts"]
1616
}

examples/with-auth0/zudoku.config.ts

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,37 @@
1-
import type { ZudokuConfig } from "zudoku";
2-
import navigation from "./navigation.js";
1+
import { type ZudokuConfig } from "zudoku";
32

43
const config: ZudokuConfig = {
5-
page: {
6-
pageTitle: "",
7-
logoUrl: "https://cdn.zudoku.dev/logos/icon.svg",
8-
logo: {
9-
src: {
10-
light: "https://cdn.zudoku.dev/logos/zudoku-logo-full-light.svg",
11-
dark: "https://cdn.zudoku.dev/logos/zudoku-logo-full-dark.svg",
4+
topNavigation: [
5+
{ id: "documentation", label: "Documentation" },
6+
{ id: "api", label: "Rick & Morty API" },
7+
],
8+
sidebar: {
9+
documentation: [
10+
{
11+
type: "category",
12+
label: "Get started",
13+
items: ["introduction", "installation"],
1214
},
13-
width: "130px",
14-
},
15+
],
1516
},
16-
metadata: {
17-
title: "%s | Zudoku",
18-
},
19-
theme: {
20-
light: {
21-
primary: "316 100% 50%",
22-
primaryForeground: "360 100% 100%",
23-
},
24-
dark: {
25-
primary: "316 100% 50%",
26-
primaryForeground: "360 100% 100%",
27-
},
17+
redirects: [{ from: "/", to: "/documentation/introduction" }],
18+
docs: {
19+
files: "/pages/**/*.mdx",
2820
},
21+
// Authentication configuration
2922
authentication: {
3023
type: "auth0",
3124
domain: "ntotten-test.us.auth0.com",
3225
clientId: "s2YqBXJ0BDykcaIOEW4cXXacaUntA1bm",
3326
},
34-
navigation,
35-
redirects: [{ from: "/", to: "/documentation", replace: true }],
3627
apiKeys: {
3728
enabled: true,
3829
endpoint: "https://zudoku-customer-main-b36fa2f.d2.zuplo.dev",
39-
// getConsumers: async () => {
40-
// return [
41-
// {
42-
// name: "consumer1",
43-
// apiKeys: [
44-
// {
45-
// key: "key_123",
46-
// id: "id_123",
47-
// createdOn: "2023-10-10",
48-
// },
49-
// ],
50-
// },
51-
// ];
52-
// },
5330
},
5431
apis: {
5532
type: "url",
56-
input: `https://blue-sloth-main-afc3428.d2.zuplo.dev/schemas/rewiring-america`,
57-
path: "/api",
58-
// server: "/__z/graphq",
59-
},
60-
docs: {
61-
files: "/pages/**/*.mdx",
33+
input: "https://rickandmorty.zuplo.io/openapi.json",
34+
navigationId: "api",
6235
},
6336
};
6437

examples/with-config/zudoku.config.ts

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,22 @@
11
import type { ZudokuConfig } from "zudoku";
22

33
const config: ZudokuConfig = {
4-
page: {
5-
pageTitle: "",
6-
logoUrl: "https://cdn.zudoku.dev/logos/icon.svg",
7-
logo: {
8-
src: {
9-
light: "https://cdn.zudoku.dev/logos/zudoku-logo-full-light.svg",
10-
dark: "https://cdn.zudoku.dev/logos/zudoku-logo-full-dark.svg",
11-
},
12-
width: "130px",
13-
},
14-
},
15-
metadata: {
16-
title: "%s | Zudoku",
17-
},
18-
theme: {
19-
light: {
20-
primary: "316 100% 50%",
21-
primaryForeground: "360 100% 100%",
22-
},
23-
dark: {
24-
primary: "316 100% 50%",
25-
primaryForeground: "360 100% 100%",
26-
},
27-
},
28-
authentication: {
29-
type: "clerk",
30-
clerkPubKey: "pk_test_ZGVlcC1vd2wtNDAuY2xlcmsuYWNjb3VudHMuZGV2JA",
31-
},
324
topNavigation: [
335
{ id: "documentation", label: "Documentation" },
346
{ id: "api", label: "Rick & Morty API" },
357
],
368
sidebar: {
37-
documentation: ["introduction", "installation"],
9+
documentation: [
10+
{
11+
type: "category",
12+
label: "Get started",
13+
items: ["introduction", "installation"],
14+
},
15+
],
3816
},
3917
redirects: [
40-
{ from: "/", to: "/documentation/introduction", replace: true },
41-
{
42-
from: "/documentation",
43-
to: "/documentation/introduction",
44-
replace: true,
45-
},
18+
{ from: "/", to: "/documentation/introduction" },
19+
{ from: "/documentation", to: "/documentation/introduction" },
4620
],
4721
apis: {
4822
type: "url",

examples/with-vite-config/navigation.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
11
import type { ZudokuConfig } from "zudoku";
2-
import navigation from "./navigation.js";
32

43
const config: ZudokuConfig = {
5-
navigation,
4+
redirects: [
5+
{ from: "/", to: "/documentation/introduction" },
6+
{ from: "/documentation", to: "/documentation/introduction" },
7+
],
8+
topNavigation: [
9+
{ id: "documentation", label: "Documentation" },
10+
{ id: "api", label: "Rick & Morty API" },
11+
],
12+
sidebar: {
13+
documentation: [
14+
{
15+
type: "category",
16+
label: "Get started",
17+
items: ["introduction", "installation"],
18+
},
19+
],
20+
},
621
docs: {
722
files: "/pages/**/*.mdx",
823
},
24+
apis: {
25+
type: "url",
26+
input: "https://rickandmorty.zuplo.io/openapi.json",
27+
navigationId: "api",
28+
},
929
};
1030

1131
export default config;

0 commit comments

Comments
 (0)