@mehdad67/create-apitogo 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +18 -0
- package/README.md +115 -0
- package/dist/index.js +73 -0
- package/dist/templates/default/js/.env.example +2 -0
- package/dist/templates/default/js/README-template.md +28 -0
- package/dist/templates/default/js/apis/openapi.yaml +806 -0
- package/dist/templates/default/js/apitogo.config.jsx +73 -0
- package/dist/templates/default/js/eslintrc.json +4 -0
- package/dist/templates/default/js/gitignore +32 -0
- package/dist/templates/default/js/pages/example.mdx +131 -0
- package/dist/templates/default/js/pages/introduction.mdx +20 -0
- package/dist/templates/default/js/public/Icon.png +0 -0
- package/dist/templates/default/js/public/logo-dark.png +0 -0
- package/dist/templates/default/js/public/logo-dark.svg +1 -0
- package/dist/templates/default/js/public/logo-light.png +0 -0
- package/dist/templates/default/js/public/logo-light.svg +1 -0
- package/dist/templates/default/ts/.env.example +2 -0
- package/dist/templates/default/ts/README-template.md +28 -0
- package/dist/templates/default/ts/apis/openapi.yaml +806 -0
- package/dist/templates/default/ts/apitogo.config.tsx +74 -0
- package/dist/templates/default/ts/eslintrc.json +6 -0
- package/dist/templates/default/ts/gitignore +32 -0
- package/dist/templates/default/ts/pages/example.mdx +132 -0
- package/dist/templates/default/ts/pages/introduction.mdx +20 -0
- package/dist/templates/default/ts/public/Icon.png +0 -0
- package/dist/templates/default/ts/public/banner-dark.svg +100 -0
- package/dist/templates/default/ts/public/banner.svg +100 -0
- package/dist/templates/default/ts/public/logo-dark.png +0 -0
- package/dist/templates/default/ts/public/logo-dark.svg +1 -0
- package/dist/templates/default/ts/public/logo-light.png +0 -0
- package/dist/templates/default/ts/public/logo-light.svg +1 -0
- package/dist/templates/default/ts/tsconfig.json +16 -0
- package/dist/templates/index.ts +336 -0
- package/dist/templates/types.ts +22 -0
- package/dist/templates/zuplo/README-template.md +40 -0
- package/dist/templates/zuplo/apitogo.config.tsx +94 -0
- package/dist/templates/zuplo/gitignore +32 -0
- package/dist/templates/zuplo/pages/introduction.mdx +153 -0
- package/dist/templates/zuplo/pages/markdown.mdx +108 -0
- package/dist/templates/zuplo/public/banner-dark.svg +100 -0
- package/dist/templates/zuplo/public/banner.svg +100 -0
- package/dist/templates/zuplo/tsconfig.json +16 -0
- package/package.json +52 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/** @type {import('@lukoweb/apitogo').ApitogoConfig} */
|
|
2
|
+
const config = {
|
|
3
|
+
site: {
|
|
4
|
+
title: "__APP_TITLE__",
|
|
5
|
+
logo: {
|
|
6
|
+
src: { light: "/logo-light.png", dark: "/logo-dark.png" },
|
|
7
|
+
alt: "APIToGo",
|
|
8
|
+
width: "130px",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
metadata: {
|
|
12
|
+
favicon: "/Icon.png",
|
|
13
|
+
},
|
|
14
|
+
docs: {
|
|
15
|
+
files: "/pages/**/*.{md,mdx}",
|
|
16
|
+
},
|
|
17
|
+
navigation: [
|
|
18
|
+
{
|
|
19
|
+
type: "category",
|
|
20
|
+
label: "Documentation",
|
|
21
|
+
items: [
|
|
22
|
+
{
|
|
23
|
+
type: "category",
|
|
24
|
+
label: "Getting Started",
|
|
25
|
+
icon: "sparkles",
|
|
26
|
+
items: [
|
|
27
|
+
"/introduction",
|
|
28
|
+
"/example",
|
|
29
|
+
{
|
|
30
|
+
type: "link",
|
|
31
|
+
icon: "folder-cog",
|
|
32
|
+
badge: {
|
|
33
|
+
label: "New",
|
|
34
|
+
color: "purple",
|
|
35
|
+
},
|
|
36
|
+
label: "API Reference",
|
|
37
|
+
to: "/api",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: "category",
|
|
43
|
+
label: "Useful Links",
|
|
44
|
+
collapsible: false,
|
|
45
|
+
icon: "link",
|
|
46
|
+
items: [
|
|
47
|
+
{
|
|
48
|
+
type: "link",
|
|
49
|
+
icon: "book",
|
|
50
|
+
label: "APIToGo",
|
|
51
|
+
to: "https://apitogo.com",
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: "link",
|
|
59
|
+
to: "/api",
|
|
60
|
+
label: "API Reference",
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
redirects: [{ from: "/", to: "/introduction" }],
|
|
64
|
+
apis: [
|
|
65
|
+
{
|
|
66
|
+
type: "file",
|
|
67
|
+
input: "./apis/openapi.yaml",
|
|
68
|
+
path: "api",
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export default config;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
/node_modules
|
|
5
|
+
/.pnp
|
|
6
|
+
.pnp.*
|
|
7
|
+
.yarn/*
|
|
8
|
+
!.yarn/patches
|
|
9
|
+
!.yarn/plugins
|
|
10
|
+
!.yarn/releases
|
|
11
|
+
!.yarn/versions
|
|
12
|
+
|
|
13
|
+
# testing
|
|
14
|
+
/coverage
|
|
15
|
+
|
|
16
|
+
# zudoku
|
|
17
|
+
/dist/
|
|
18
|
+
|
|
19
|
+
# misc
|
|
20
|
+
.DS_Store
|
|
21
|
+
*.pem
|
|
22
|
+
|
|
23
|
+
# debug
|
|
24
|
+
npm-debug.log*
|
|
25
|
+
yarn-debug.log*
|
|
26
|
+
yarn-error.log*
|
|
27
|
+
|
|
28
|
+
# env files (can opt-in for commiting if needed)
|
|
29
|
+
.env*
|
|
30
|
+
|
|
31
|
+
# typescript
|
|
32
|
+
*.tsbuildinfo
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MDX examples
|
|
3
|
+
description:
|
|
4
|
+
Callouts, fenced code, tabbed code, tables, task lists, links, badges, and buttons available in
|
|
5
|
+
APIToGo MDX pages.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
This page lists patterns you can copy into any `.mdx` file under `pages/`. Your site title comes
|
|
9
|
+
from front matter (`title` above) and appears in the sidebar for this route.
|
|
10
|
+
|
|
11
|
+
<Link to="/introduction">Introduction</Link> · <Link to="/api">API reference</Link> ·
|
|
12
|
+
<Badge variant="secondary">built-in</Badge> <Badge variant="outline">mdx</Badge>
|
|
13
|
+
|
|
14
|
+
## Callouts (directives)
|
|
15
|
+
|
|
16
|
+
:::note{title="Note"}
|
|
17
|
+
|
|
18
|
+
Neutral context readers should notice.
|
|
19
|
+
|
|
20
|
+
:::
|
|
21
|
+
|
|
22
|
+
:::tip{title="Tip"}
|
|
23
|
+
|
|
24
|
+
Suggested workflows or shortcuts.
|
|
25
|
+
|
|
26
|
+
:::
|
|
27
|
+
|
|
28
|
+
:::info{title="Info"}
|
|
29
|
+
|
|
30
|
+
Extra detail that is not urgent.
|
|
31
|
+
|
|
32
|
+
:::
|
|
33
|
+
|
|
34
|
+
:::caution{title="Caution"}
|
|
35
|
+
|
|
36
|
+
Something might break if misconfigured.
|
|
37
|
+
|
|
38
|
+
:::
|
|
39
|
+
|
|
40
|
+
:::danger{title="Danger"}
|
|
41
|
+
|
|
42
|
+
Destructive or security-sensitive actions.
|
|
43
|
+
|
|
44
|
+
:::
|
|
45
|
+
|
|
46
|
+
## Fenced code
|
|
47
|
+
|
|
48
|
+
Inline: `ApitogoConfig`, `apitogo dev`, `pages/example.mdx`.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
apitogo dev
|
|
52
|
+
apitogo build
|
|
53
|
+
apitogo preview
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{ "example": true }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```jsx
|
|
61
|
+
/** @type {import('@lukoweb/apitogo').ApitogoConfig} */
|
|
62
|
+
const config = {
|
|
63
|
+
site: { title: "My API docs" },
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export default config;
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Tabbed code (`CodeTabs`)
|
|
70
|
+
|
|
71
|
+
<CodeTabs>
|
|
72
|
+
|
|
73
|
+
```bash title="curl"
|
|
74
|
+
curl -sS https://httpbin.org/get
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```bash title="HTTPie"
|
|
78
|
+
http GET https://httpbin.org/get
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```ts title="fetch"
|
|
82
|
+
const res = await fetch("https://httpbin.org/get");
|
|
83
|
+
console.log(await res.json());
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
</CodeTabs>
|
|
87
|
+
|
|
88
|
+
<CodeTabs>
|
|
89
|
+
|
|
90
|
+
```json title="JSON"
|
|
91
|
+
{ "status": "ok" }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```yaml title="YAML"
|
|
95
|
+
status: ok
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
</CodeTabs>
|
|
99
|
+
|
|
100
|
+
## Table
|
|
101
|
+
|
|
102
|
+
| Topic | Where to look |
|
|
103
|
+
| ------- | -------------------- |
|
|
104
|
+
| Config | `apitogo.config.jsx` |
|
|
105
|
+
| Pages | `pages/**/*.mdx` |
|
|
106
|
+
| OpenAPI | `apis/openapi.yaml` |
|
|
107
|
+
|
|
108
|
+
## Lists
|
|
109
|
+
|
|
110
|
+
1. Edit Markdown or MDX under `pages/`.
|
|
111
|
+
2. Adjust `apitogo.config.jsx`.
|
|
112
|
+
3. Run `apitogo build` before deploy.
|
|
113
|
+
|
|
114
|
+
Task list (GFM):
|
|
115
|
+
|
|
116
|
+
- [x] Scaffold created
|
|
117
|
+
- [ ] Customize for your API
|
|
118
|
+
|
|
119
|
+
## Markdown
|
|
120
|
+
|
|
121
|
+
> Blockquote for quotes or asides.
|
|
122
|
+
|
|
123
|
+
**Bold**, _italic_, ~~strikethrough~~, and [link to API](/api).
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Button
|
|
128
|
+
|
|
129
|
+
<Button variant="outline" type="button">
|
|
130
|
+
Example button
|
|
131
|
+
</Button>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Welcome to APIToGo
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Thanks for choosing to use APIToGo to power your API documentation!
|
|
6
|
+
|
|
7
|
+
## Edit this page
|
|
8
|
+
|
|
9
|
+
To edit this page, open the `pages/introduction.mdx` file.
|
|
10
|
+
|
|
11
|
+
## Configuration
|
|
12
|
+
|
|
13
|
+
You can find the full configuration for your APIToGo site in the `apitogo.config.jsx` file.
|
|
14
|
+
|
|
15
|
+
For further information on how to customize your site, check out the
|
|
16
|
+
[APIToGo documentation](https://docs.apitogo.com).
|
|
17
|
+
|
|
18
|
+
## MDX building blocks
|
|
19
|
+
|
|
20
|
+
See [MDX examples](/example) for callouts, code blocks, tabs, tables, and common components.
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="24" fill="none" viewBox="0 0 120 24"><g fill="#fff"><path fill-rule="evenodd" d="M19.064 1.116A1.754 1.754 0 0 1 20.7 0h6.018c2.372 0 4.063 2.3 3.356 4.564l-1.939 6.203A1.758 1.758 0 0 1 26.459 12H18c-1.243 0-1.875 1.125-2.25 2.25-.291.873-2.39 6.265-3.314 8.634A1.754 1.754 0 0 1 10.8 24H4.782c-2.372 0-4.063-2.3-3.356-4.564l1.939-6.203A1.758 1.758 0 0 1 5.042 12H13.5c1.243 0 1.875-1.125 2.25-2.25.291-.873 2.39-6.265 3.314-8.634Z" clip-rule="evenodd"/><path d="M20.05 13.875c-.782 0-1.481.485-1.756 1.217l-2.747 7.325A1.172 1.172 0 0 0 16.645 24h7.06a4.688 4.688 0 0 0 4.39-3.042l1.171-3.125c.718-1.915-.697-3.958-2.743-3.958H20.05ZM8.17 0a4.688 4.688 0 0 0-4.389 3.042L2.61 6.167c-.718 1.915.698 3.958 2.743 3.958h6.473c.782 0 1.482-.485 1.756-1.217l2.747-7.325A1.172 1.172 0 0 0 15.231 0H8.17ZM37.2 18.436v-3.03l5.793-6.518-.027-.027c-.536.054-.59.054-1.153.054h-4.506V5.83h10.058v3.03l-5.82 6.518.027.026c.536-.053.616-.053 1.18-.053h4.666v3.084H37.2ZM55.222 18.731c-3.863-.027-5.981-2.44-5.981-5.847V5.831h3.7v6.785c0 1.77.779 2.87 2.28 2.897 1.637.027 2.334-1.073 2.334-2.87V5.83h3.701v7.08c0 3.245-2.494 5.847-6.034 5.82ZM85.19 18.731c-3.997 0-6.813-2.843-6.813-6.598s2.816-6.597 6.812-6.597c3.996 0 6.813 2.842 6.813 6.597 0 3.755-2.817 6.598-6.813 6.598Zm0-3.192c1.85 0 3.164-1.394 3.164-3.406 0-2.011-1.314-3.406-3.165-3.406-1.85 0-3.165 1.395-3.165 3.406 0 2.012 1.315 3.407 3.165 3.407ZM101.626 18.436l-4.292-6.92v6.92h-3.7V.145h3.7v10.54l4.023-4.854h4.292l-4.533 5.203 4.801 7.402h-4.291ZM113.02 18.731c-3.862-.027-5.981-2.44-5.981-5.847V5.831h3.702v6.785c0 1.77.777 2.87 2.279 2.897 1.636.027 2.334-1.073 2.334-2.87V5.83h3.701v7.08c0 3.245-2.494 5.847-6.035 5.82Z"/><path fill-rule="evenodd" d="M76.74.12h-3.922v5.975a7.44 7.44 0 0 0-2.891-.56c-3.996 0-6.813 2.843-6.813 6.598s2.817 6.598 6.813 6.598c3.958 0 6.759-2.79 6.811-6.492h.001V.12Zm-3.648 12.013c0 2.012-1.314 3.407-3.165 3.407-1.85 0-3.165-1.395-3.165-3.407 0-2.011 1.314-3.406 3.165-3.406 1.85 0 3.165 1.395 3.165 3.406Z" clip-rule="evenodd"/></g></svg>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="24" fill="none" viewBox="0 0 120 24"><g fill="#000"><path fill-rule="evenodd" d="M19.064 1.116A1.754 1.754 0 0 1 20.7 0h6.018c2.372 0 4.063 2.3 3.356 4.564l-1.939 6.203A1.758 1.758 0 0 1 26.459 12H18c-1.243 0-1.875 1.125-2.25 2.25-.291.873-2.39 6.265-3.314 8.634A1.754 1.754 0 0 1 10.8 24H4.782c-2.372 0-4.063-2.3-3.356-4.564l1.939-6.203A1.758 1.758 0 0 1 5.042 12H13.5c1.243 0 1.875-1.125 2.25-2.25.291-.873 2.39-6.265 3.314-8.634Z" clip-rule="evenodd"/><path d="M20.05 13.875c-.782 0-1.481.485-1.756 1.217l-2.747 7.325A1.172 1.172 0 0 0 16.645 24h7.06a4.688 4.688 0 0 0 4.39-3.042l1.171-3.125c.718-1.915-.697-3.958-2.743-3.958H20.05ZM8.17 0a4.688 4.688 0 0 0-4.389 3.042L2.61 6.167c-.718 1.915.698 3.958 2.743 3.958h6.473c.782 0 1.482-.485 1.756-1.217l2.747-7.325A1.172 1.172 0 0 0 15.231 0H8.17ZM37.2 18.436v-3.03l5.793-6.518-.027-.027c-.536.054-.59.054-1.153.054h-4.506V5.83h10.058v3.03l-5.82 6.518.027.026c.536-.053.616-.053 1.18-.053h4.666v3.084H37.2ZM55.222 18.731c-3.863-.027-5.981-2.44-5.981-5.847V5.831h3.7v6.785c0 1.77.779 2.87 2.28 2.897 1.637.027 2.334-1.073 2.334-2.87V5.83h3.701v7.08c0 3.245-2.494 5.847-6.034 5.82ZM85.19 18.731c-3.997 0-6.813-2.843-6.813-6.598s2.816-6.597 6.812-6.597c3.996 0 6.813 2.842 6.813 6.597 0 3.755-2.817 6.598-6.813 6.598Zm0-3.192c1.85 0 3.164-1.394 3.164-3.406 0-2.011-1.314-3.406-3.165-3.406-1.85 0-3.165 1.395-3.165 3.406 0 2.012 1.315 3.407 3.165 3.407ZM101.626 18.436l-4.292-6.92v6.92h-3.7V.145h3.7v10.54l4.023-4.854h4.292l-4.533 5.203 4.801 7.402h-4.291ZM113.02 18.731c-3.862-.027-5.981-2.44-5.981-5.847V5.831h3.702v6.785c0 1.77.777 2.87 2.279 2.897 1.636.027 2.334-1.073 2.334-2.87V5.83h3.701v7.08c0 3.245-2.494 5.847-6.035 5.82Z"/><path fill-rule="evenodd" d="M76.74.12h-3.922v5.975a7.44 7.44 0 0 0-2.891-.56c-3.996 0-6.813 2.843-6.813 6.598s2.817 6.598 6.813 6.598c3.958 0 6.759-2.79 6.811-6.492h.001V.12Zm-3.648 12.013c0 2.012-1.314 3.407-3.165 3.407-1.85 0-3.165-1.395-3.165-3.407 0-2.011 1.314-3.406 3.165-3.406 1.85 0 3.165 1.395 3.165 3.406Z" clip-rule="evenodd"/></g></svg>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# APIToGo App
|
|
2
|
+
|
|
3
|
+
This APIToGo app was created with [`@lukoweb/create-apitogo`](https://apitogo.com).
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
First, run the development server:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run dev
|
|
11
|
+
# or
|
|
12
|
+
yarn dev
|
|
13
|
+
# or
|
|
14
|
+
pnpm dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `pages/intro.mdx`. You will see the content
|
|
20
|
+
automatically update as you save the file.
|
|
21
|
+
|
|
22
|
+
## Learn More
|
|
23
|
+
|
|
24
|
+
To learn more about APIToGo, you can visit [apitogo.com](https://apitogo.com).
|
|
25
|
+
|
|
26
|
+
To connect with the community join the
|
|
27
|
+
[GitHub Discussions](https://github.com/zuplo/zudoku/discussions) or
|
|
28
|
+
[Discord](https://discord.zudoku.dev).
|