@heyo-sh/create-heyo-docs 1.0.1 → 2.0.0

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.
Files changed (118) hide show
  1. package/deployments/cloudflare/astro/package.json +2 -1
  2. package/deployments/cloudflare/astro/src/env.d.ts +4 -1
  3. package/deployments/cloudflare/astro/src/pages/heyo-docs-internal/ai-chat.ts +9 -7
  4. package/deployments/cloudflare/next/app/heyo-docs-internal/ai-chat/route.ts +9 -7
  5. package/deployments/cloudflare/next/cloudflare-env.d.ts +4 -1
  6. package/deployments/cloudflare/react-router/app/cloudflare-env.d.ts +4 -1
  7. package/deployments/cloudflare/react-router/app/routes/ai-chat.ts +9 -8
  8. package/deployments/cloudflare/react-router/package.json +2 -1
  9. package/deployments/vercel/astro/package.json +1 -0
  10. package/dist/index.js +24 -4
  11. package/dist/scaffold.d.ts.map +1 -1
  12. package/dist/utils.d.ts.map +1 -1
  13. package/package.json +1 -1
  14. package/templates/astro/content/index.mdx +8 -0
  15. package/templates/astro/heyo-docs.config.ts +4 -48
  16. package/templates/astro/src/components/docs-app.tsx +30 -130
  17. package/templates/astro/src/heyo-docs-icons.tsx +3 -1
  18. package/templates/astro/src/layouts/docs-layout.astro +10 -436
  19. package/templates/astro/src/lib/docs.ts +3 -2
  20. package/templates/astro/src/lib/openapi-request.ts +6 -146
  21. package/templates/astro/src/pages/[...slug].astro +7 -15
  22. package/templates/astro/src/pages/[...slug].md.ts +4 -1
  23. package/templates/astro/src/pages/heyo-docs-internal/ai-chat.ts +5 -7
  24. package/templates/astro/src/pages/heyo-docs-internal/openapi-request.ts +6 -0
  25. package/templates/astro/src/pages/index.astro +18 -9
  26. package/templates/astro/src/pages/llms-full.txt.ts +1 -1
  27. package/templates/astro/src/pages/llms.txt.ts +1 -1
  28. package/templates/astro/src/pages/rss.xml.ts +1 -1
  29. package/templates/astro/src/pages/sitemap.xml.ts +2 -2
  30. package/templates/astro/src/virtual.d.ts +5 -5
  31. package/templates/next/app/[[...slug]]/page.tsx +10 -9
  32. package/templates/next/app/components/docs-app.tsx +28 -120
  33. package/templates/next/app/heyo-docs-icons.tsx +1 -1
  34. package/templates/next/app/heyo-docs-internal/ai-chat/route.ts +6 -7
  35. package/templates/next/app/heyo-docs-internal/markdown/[[...slug]]/route.ts +1 -1
  36. package/templates/next/app/layout.tsx +25 -444
  37. package/templates/next/app/lib/docs.ts +3 -3
  38. package/templates/next/app/lib/openapi-request.ts +4 -136
  39. package/templates/next/app/llms-full.txt/route.ts +1 -1
  40. package/templates/next/app/llms.txt/route.ts +1 -1
  41. package/templates/next/app/rss.xml/route.ts +1 -1
  42. package/templates/next/app/sitemap.xml/route.ts +1 -1
  43. package/templates/next/content/index.mdx +8 -0
  44. package/templates/next/heyo-docs.config.ts +3 -47
  45. package/templates/next/next.config.ts +7 -1
  46. package/templates/react-router/app/heyo-docs-icons.tsx +3 -1
  47. package/templates/react-router/app/root.tsx +28 -465
  48. package/templates/react-router/app/routes/ai-chat.ts +4 -8
  49. package/templates/react-router/app/routes/docs.tsx +22 -63
  50. package/templates/react-router/app/routes/home.tsx +6 -1
  51. package/templates/react-router/app/routes/llms-full.ts +1 -1
  52. package/templates/react-router/app/routes/llms.ts +1 -1
  53. package/templates/react-router/app/routes/markdown.ts +4 -1
  54. package/templates/react-router/app/routes/openapi-request.ts +11 -144
  55. package/templates/react-router/app/routes/rss.ts +1 -1
  56. package/templates/react-router/app/routes/sitemap.ts +5 -8
  57. package/templates/react-router/app/virtual.d.ts +5 -5
  58. package/templates/react-router/content/index.mdx +8 -0
  59. package/templates/react-router/heyo-docs.config.ts +4 -48
  60. package/templates/astro/content/api-overview.mdx +0 -20
  61. package/templates/astro/content/assets/local-architecture.svg +0 -22
  62. package/templates/astro/content/assets/quick-reference.txt +0 -5
  63. package/templates/astro/content/changelog.mdx +0 -38
  64. package/templates/astro/content/configuration.mdx +0 -117
  65. package/templates/astro/content/deploying.mdx +0 -70
  66. package/templates/astro/content/essentials/callouts.mdx +0 -34
  67. package/templates/astro/content/essentials/code-blocks.mdx +0 -43
  68. package/templates/astro/content/essentials/lists.mdx +0 -36
  69. package/templates/astro/content/essentials/tables.mdx +0 -30
  70. package/templates/astro/content/essentials/tabs.mdx +0 -40
  71. package/templates/astro/content/essentials/text-styling.mdx +0 -43
  72. package/templates/astro/content/getting-started.mdx +0 -16
  73. package/templates/astro/content/mdx-components.mdx +0 -44
  74. package/templates/astro/content/openapi-petstore.json +0 -160
  75. package/templates/astro/content/openapi.json +0 -278
  76. package/templates/astro/content/quickstart.mdx +0 -60
  77. package/templates/astro/src/components/theme-provider.tsx +0 -106
  78. package/templates/astro/src/lib/seo.ts +0 -221
  79. package/templates/astro/src/lib/theme.ts +0 -74
  80. package/templates/next/app/components/theme-provider.tsx +0 -93
  81. package/templates/next/app/lib/seo.ts +0 -189
  82. package/templates/next/app/lib/theme.ts +0 -61
  83. package/templates/next/content/api-overview.mdx +0 -20
  84. package/templates/next/content/assets/local-architecture.svg +0 -22
  85. package/templates/next/content/assets/quick-reference.txt +0 -5
  86. package/templates/next/content/changelog.mdx +0 -38
  87. package/templates/next/content/configuration.mdx +0 -117
  88. package/templates/next/content/deploying.mdx +0 -70
  89. package/templates/next/content/essentials/callouts.mdx +0 -34
  90. package/templates/next/content/essentials/code-blocks.mdx +0 -43
  91. package/templates/next/content/essentials/lists.mdx +0 -36
  92. package/templates/next/content/essentials/tables.mdx +0 -30
  93. package/templates/next/content/essentials/tabs.mdx +0 -40
  94. package/templates/next/content/essentials/text-styling.mdx +0 -43
  95. package/templates/next/content/getting-started.mdx +0 -16
  96. package/templates/next/content/mdx-components.mdx +0 -41
  97. package/templates/next/content/openapi-petstore.json +0 -160
  98. package/templates/next/content/openapi.json +0 -278
  99. package/templates/next/content/quickstart.mdx +0 -60
  100. package/templates/react-router/app/components/theme-provider.tsx +0 -106
  101. package/templates/react-router/app/lib/theme.ts +0 -74
  102. package/templates/react-router/content/api-overview.mdx +0 -20
  103. package/templates/react-router/content/assets/local-architecture.svg +0 -22
  104. package/templates/react-router/content/assets/quick-reference.txt +0 -5
  105. package/templates/react-router/content/changelog.mdx +0 -38
  106. package/templates/react-router/content/configuration.mdx +0 -117
  107. package/templates/react-router/content/deploying.mdx +0 -70
  108. package/templates/react-router/content/essentials/callouts.mdx +0 -34
  109. package/templates/react-router/content/essentials/code-blocks.mdx +0 -43
  110. package/templates/react-router/content/essentials/lists.mdx +0 -36
  111. package/templates/react-router/content/essentials/tables.mdx +0 -30
  112. package/templates/react-router/content/essentials/tabs.mdx +0 -40
  113. package/templates/react-router/content/essentials/text-styling.mdx +0 -43
  114. package/templates/react-router/content/getting-started.mdx +0 -16
  115. package/templates/react-router/content/mdx-components.mdx +0 -293
  116. package/templates/react-router/content/openapi-petstore.json +0 -160
  117. package/templates/react-router/content/openapi.json +0 -278
  118. package/templates/react-router/content/quickstart.mdx +0 -60
@@ -1,117 +0,0 @@
1
- ---
2
- title: Basic Configuration
3
- description: Set the identity, content source, and sidebar structure for a Heyo Docs site.
4
- ---
5
-
6
- # Basic Configuration
7
-
8
- `heyo-docs.config.ts` is the single source of truth for a Heyo Docs site.
9
- The framework integration and the documentation UI read the same validated
10
- object, so a change to navigation or metadata does not need to be repeated in
11
- multiple places.
12
-
13
- ## Start with the site model
14
-
15
- The generated project already includes a working configuration. Update the
16
- identity fields first, then point `content` at the directory that contains
17
- your MDX files.
18
-
19
- <CodeBlock language="ts" title="heyo-docs.config.ts" showLineNumbers>
20
- {`import { heyoDocs } from "@heyo-sh/heyo-docs";
21
-
22
- export default heyoDocs({
23
- title: "{{PROJECT_NAME}}",
24
- description: "Guides and reference for {{PROJECT_NAME}}.",
25
- content: "./content",
26
- theme: "grain",
27
- mode: "system",
28
- branding: { name: "{{PROJECT_NAME}}" },
29
- });`}
30
- </CodeBlock>
31
-
32
- Set `siteUrl` to the final public origin before publishing. It is used for
33
- canonical URLs, social metadata, the sitemap, RSS, and AI-facing discovery
34
- files.
35
-
36
- ## Organize the sidebar
37
-
38
- Use `groups` to define the order readers see. A group contains named sections
39
- and their MDX page references; a reference is relative to `content` and does
40
- not include the `.mdx` extension.
41
-
42
- <CodeBlock language="ts" title="heyo-docs.config.ts">
43
- {`groups: [
44
- {
45
- group: "Documentation",
46
- icon: "globe",
47
- sections: [
48
- {
49
- section: "Get Started",
50
- icon: "lightbulb",
51
- pages: ["quickstart", "configuration"],
52
- },
53
- {
54
- section: "Essentials",
55
- icon: "book",
56
- pages: ["essentials/text-styling", "essentials/code-blocks"],
57
- },
58
- ],
59
- },
60
- ],`}
61
- </CodeBlock>
62
-
63
- The order is meaningful: it controls the sidebar and the previous/next links at
64
- the end of each article. Use a page object with `title` and `src` when a
65
- sidebar entry should point to a page outside the local documentation.
66
-
67
- ## AI chat
68
-
69
- Add `ai.chat` to enable a documentation-aware chat through [Pi](https://github.com/badlogic/pi-mono).
70
- Use any provider identifier bundled with the installed Pi version, such as
71
- `openai`, `anthropic`, `google`, `openrouter`, or `xai`. Authentication stays
72
- server-only and is supplied by the route that handles the chat request.
73
-
74
- <CodeBlock language="ts" title="heyo-docs.config.ts">
75
- {`ai: {
76
- chat: {
77
- provider: "openai",
78
- model: "gpt-5-mini",
79
- variant: "right", // "center" shows the compact prompt first
80
- icon: "chat",
81
- text: "AI Chat",
82
- name: "Docs Assistant", // name shown in the drawer and message labels
83
- placeholder: "Ask AI about the docs", // used in the compact prompt and drawer
84
- },
85
- },`}
86
- </CodeBlock>
87
-
88
- `provider` and `model` are required. Keep the credential out of this
89
- configuration and pass it as `auth` to `createAiChatResponse` in the server
90
- route. Cloudflare routes obtain the key from the Worker `env` binding; Node.js
91
- routes can read their server environment there. GitHub Copilot and OpenAI Codex
92
- use `auth: { type: "oauth", getAccessToken }`; Amazon Bedrock uses either
93
- `{ type: "aws", region?, profile? }` and the AWS credential chain, or
94
- `{ type: "bedrock-bearer", token, region? }`. The model must be an actual model
95
- identifier, not the provider name. Amazon Bedrock requires a Node.js chat
96
- endpoint. `variant` defaults to `right`. `name`
97
- defaults to `AI`; it is used for the drawer title and the assistant's message
98
- label. `placeholder` defaults to
99
- `Ask AI about the docs` and is shared by the compact prompt and drawer input.
100
- The drawer stays open while
101
- readers navigate between documentation pages and does not block the rest of the
102
- page.
103
-
104
- Its chrome follows the selected documentation theme. For example, `grain` uses
105
- a full-height right panel with a left border, while the other themes keep a
106
- floating panel treatment.
107
-
108
- ## Verify the result
109
-
110
- Run the project's typecheck and build commands after changing configuration.
111
- They resolve each configured MDX page and report missing paths or malformed
112
- navigation before the site is deployed.
113
-
114
- <Callout type="info" title="Keep page metadata close to the page">
115
- Put a page's <code>title</code> and <code>description</code> in its MDX
116
- frontmatter. Keep shared site settings in <code>heyo-docs.config.ts</code>.
117
- </Callout>
@@ -1,70 +0,0 @@
1
- ---
2
- title: Deploying
3
- description: Build and publish your Heyo Docs site with the deployment target chosen during setup.
4
- ---
5
-
6
- # Deploying
7
-
8
- A Heyo Docs site is built as part of the framework application. The creator asks
9
- for a deployment target when the project is created and adds the corresponding
10
- configuration, so the same MDX content, navigation, search, and metadata are
11
- used locally and in production.
12
-
13
- ## Choose the target during setup
14
-
15
- Select Vercel or Cloudflare when running the creator if you already know where
16
- the site will live. The generated project includes the adapter and deployment
17
- configuration required by that platform. You can also choose to configure
18
- deployment later and keep the starter focused on local development.
19
-
20
- ## Build before publishing
21
-
22
- Run the production build on your machine before creating a deployment. It
23
- resolves every configured page, validates the navigation tree, and generates
24
- the sitemap, RSS feed, robots file, and AI-facing documentation endpoints.
25
-
26
- <CodeBlock language="bash" title="Terminal">
27
- {"bun run build"}
28
- </CodeBlock>
29
-
30
- Use the equivalent `npm run build`, `pnpm build`, or `yarn build` command
31
- when the project uses a different package manager.
32
-
33
- ## Cloudflare secrets
34
-
35
- For AI chat, save the provider key as a Worker secret:
36
-
37
- <CodeBlock language="bash" title="Terminal">
38
- {"bunx wrangler secret put OPENAI_API_KEY"}
39
- </CodeBlock>
40
-
41
- Keep the credential out of `heyo-docs.config.ts`. The Cloudflare overlay reads
42
- the native Worker `env.OPENAI_API_KEY` binding in the AI route, after the
43
- request reaches the Worker. It is never part of the documentation build or the
44
- browser bundle.
45
-
46
- <Callout type="tip" title="Set the canonical URL">
47
- Add the final public origin as <code>siteUrl</code> in
48
- <code>heyo-docs.config.ts</code> before the first production release. It keeps
49
- canonical links, social metadata, and generated discovery files consistent.
50
- </Callout>
51
-
52
- ## Publish the project
53
-
54
- For a generated Vercel or Cloudflare project, connect the repository in the
55
- provider dashboard or run the deployment script included by the selected setup.
56
- The provider builds the application with the same command you verified locally.
57
-
58
- <Steps>
59
- <Step title="Push the documentation source">
60
- Commit the MDX content and <code>heyo-docs.config.ts</code> together so the
61
- deployed navigation matches the reviewed pages.
62
- </Step>
63
- <Step title="Create a preview">
64
- Review the provider's preview URL for layout, links, search, and metadata.
65
- </Step>
66
- <Step title="Promote the production build">
67
- Publish once the preview is correct and the configured <code>siteUrl</code>
68
- matches the public domain.
69
- </Step>
70
- </Steps>
@@ -1,34 +0,0 @@
1
- ---
2
- title: Callouts
3
- description: Draw attention to a tip, warning, prerequisite, or result.
4
- ---
5
-
6
- # Callouts
7
-
8
- Use a callout when a reader should not miss a detail.
9
-
10
- ## Add a tip
11
-
12
- <Callout type="tip" title="Keep examples focused">
13
- Show one idea at a time so readers can apply it quickly.
14
- </Callout>
15
-
16
- ## Choose a type
17
-
18
- | Type | Use it for |
19
- | --------------------- | ---------------------- |
20
- | `info` or `note` | Helpful context |
21
- | `tip` | A recommended approach |
22
- | `check` | A successful result |
23
- | `warning` or `danger` | A real consequence |
24
-
25
- <Callout type="warning" title="Preview before publishing">
26
- Run the production build after changing navigation or MDX.
27
- </Callout>
28
-
29
- ## Keep it short
30
-
31
- <Callout type="info" title="Configuration and content work together">
32
- Navigation belongs in <code>heyo-docs.config.ts</code>. Titles and
33
- descriptions belong in page frontmatter.
34
- </Callout>
@@ -1,43 +0,0 @@
1
- ---
2
- title: Code Blocks
3
- description: Add clear, copyable commands and configuration examples.
4
- ---
5
-
6
- # Code Blocks
7
-
8
- Show one task per example. Add a language so the code is easy to read.
9
-
10
- ## Add a command
11
-
12
- ```bash
13
- bun run dev
14
- bun run build
15
- ```
16
-
17
- ## Add a file name
18
-
19
- Use `CodeBlock` when the file name helps explain where the code belongs.
20
-
21
- <CodeBlock language="ts" title="heyo-docs.config.ts" showLineNumbers>
22
- {`export default heyoDocs({
23
- title: "Orbit Docs",
24
- content: "content",
25
- theme: "grain",
26
- });`}
27
- </CodeBlock>
28
-
29
- ## Show alternatives
30
-
31
- Use `CodeBlockGroup` for equivalent commands, such as package managers.
32
-
33
- <CodeBlockGroup defaultValue="bun" variant="line">
34
- <CodeBlock language="bash" title="bun">
35
- {"bun add @heyo-sh/heyo-docs"}
36
- </CodeBlock>
37
- <CodeBlock language="bash" title="npm">
38
- {"npm install @heyo-sh/heyo-docs"}
39
- </CodeBlock>
40
- <CodeBlock language="bash" title="pnpm">
41
- {"pnpm add @heyo-sh/heyo-docs"}
42
- </CodeBlock>
43
- </CodeBlockGroup>
@@ -1,36 +0,0 @@
1
- ---
2
- title: Lists
3
- description: Use lists to make choices and short steps easy to scan.
4
- ---
5
-
6
- # Lists
7
-
8
- Use a list when readers need to scan choices or follow a short sequence.
9
-
10
- ## Add a bullet list
11
-
12
- Use bullets when the order does not matter.
13
-
14
- - Keep MDX pages in the `content` directory.
15
- - Add important routes to `heyo-docs.config.ts`.
16
- - Build the project before publishing.
17
-
18
- ## Add numbered steps
19
-
20
- Use numbers when the order matters.
21
-
22
- 1. Create an MDX file.
23
- 2. Add its path to a sidebar section.
24
- 3. Start the development server.
25
- 4. Review the rendered route.
26
-
27
- ## Add one level when needed
28
-
29
- Use a nested list only for a direct relationship.
30
-
31
- - Prepare the release:
32
- - Review the changed pages.
33
- - Confirm navigation order.
34
- - Run the production build.
35
-
36
- Use `Steps` when each step needs a command or more explanation.
@@ -1,30 +0,0 @@
1
- ---
2
- title: Tables
3
- description: Compare a small set of options with a simple Markdown table.
4
- ---
5
-
6
- # Tables
7
-
8
- Use a table to compare the same details across a small number of options.
9
-
10
- ## Add a table
11
-
12
- | Setting | Purpose | Example |
13
- | --------- | -------------------------------------- | ---------------------------- |
14
- | `content` | Directory containing MDX source files. | `"content"` |
15
- | `theme` | Built-in documentation theme. | `"grain"` |
16
- | `mode` | Initial color preference. | `"system"` |
17
- | `siteUrl` | Canonical public site origin. | `"https://docs.example.com"` |
18
-
19
- ## Keep it readable
20
-
21
- Use short headings and short cells. Put long explanations in a section below
22
- the table.
23
-
24
- | Use a table for | Use a section for |
25
- | ---------------------- | ---------------------- |
26
- | Compact comparisons | A multi-step procedure |
27
- | Option defaults | A detailed explanation |
28
- | Short reference values | A large code example |
29
-
30
- Use a numbered list when readers must act in a specific order.
@@ -1,40 +0,0 @@
1
- ---
2
- title: Tabs
3
- description: Let readers switch between equivalent commands or platforms.
4
- ---
5
-
6
- # Tabs
7
-
8
- Use tabs for equivalent ways to complete the same task. Keep their labels
9
- short.
10
-
11
- ## Add tabs
12
-
13
- <Tabs defaultValue="typescript" variant="line">
14
- <Tab title="JavaScript" value="javascript">
15
- Import the package from your JavaScript entry point.
16
- </Tab>
17
- <Tab title="TypeScript" value="typescript">
18
- Import the package with full type information and keep configuration typed.
19
- </Tab>
20
- </Tabs>
21
-
22
- ## Compare platforms
23
-
24
- Each tab should answer the same question for a different platform.
25
-
26
- <Tabs defaultValue="vercel" variant="line">
27
- <Tab title="Vercel" value="vercel">
28
- Connect the repository and let Vercel detect the framework.
29
- </Tab>
30
- <Tab title="Cloudflare" value="cloudflare">
31
- Deploy the generated static site when your team already uses Cloudflare.
32
- </Tab>
33
- <Tab title="Static host" value="static">
34
- Upload the build output to any host that serves static files.
35
- </Tab>
36
- </Tabs>
37
-
38
- <Callout type="tip" title="Use tabs sparingly">
39
- Use headings or <code>Steps</code> for information that every reader needs.
40
- </Callout>
@@ -1,43 +0,0 @@
1
- ---
2
- title: Text Styling
3
- description: Use simple Markdown for headings, emphasis, links, and quotes.
4
- ---
5
-
6
- # Text Styling
7
-
8
- Use regular Markdown for most documentation. Keep the text short and let
9
- headings show readers where to look next.
10
-
11
- ## Add headings
12
-
13
- Use `##` for a main section and `###` only for a useful subsection.
14
-
15
- ```md
16
- ## Configure navigation
17
-
18
- Add pages in the order readers should follow.
19
-
20
- ### Add an external resource
21
-
22
- Link to a resource outside your documentation.
23
- ```
24
-
25
- ## Highlight important text
26
-
27
- Use **bold** for an important choice and inline `code` for values readers need
28
- to copy.
29
-
30
- ```md
31
- Set `content: "content"` in `heyo-docs.config.ts`.
32
-
33
- Run `bun run build` before you publish.
34
- ```
35
-
36
- ## Write useful links
37
-
38
- Use the destination as the link text. It is easier to scan than a raw URL.
39
-
40
- Read the [Quickstart](/quickstart) before changing
41
- [site configuration](/configuration).
42
-
43
- > Keep one idea in each short paragraph.
@@ -1,16 +0,0 @@
1
- ---
2
- title: Getting started
3
- description: Run your new documentation site locally.
4
- ---
5
-
6
- # Getting started
7
-
8
- Install dependencies with your chosen package manager and start the development server.
9
-
10
- ## Create a page
11
-
12
- Create `content/guides/deploying.mdx` to get the `/guides/deploying` route. Its frontmatter controls its title and description.
13
-
14
- ## Configure the documentation
15
-
16
- Use `heyo-docs.config.ts` to change the title, colors, tabs, sidebar groups, footer links and selected theme without regenerating your project. Add pages or directories to a section's `pages` list to control the sidebar order.
@@ -1,44 +0,0 @@
1
- ---
2
- title: MDX components
3
- description: Every built-in MDX component, its variants, and its usage.
4
- ---
5
-
6
- # MDX components
7
-
8
- Every component below is available without an import. The examples show every visual variant, so this page is also the reference for the documentation theme.
9
-
10
- ## Button
11
-
12
- `Button` uses the same shadcn component as the theme. It accepts `variant` and `size`, and uses `href` when the button should navigate. Use `align="left"`, `"center"`, or `"right"` to position it in the documentation column.
13
-
14
- <Button href="/getting-started" variant="default" size="lg">
15
- Get started
16
- </Button>
17
-
18
- ## Callout
19
-
20
- <Callout type="tip" title="No imports needed">
21
- Write built-in components directly in any MDX page.
22
- </Callout>
23
-
24
- ## Tabs
25
-
26
- <Tabs defaultValue="npm" variant="line">
27
- <Tab title="npm">npm install @heyo-sh/heyo-docs</Tab>
28
- <Tab title="Bun">bun add @heyo-sh/heyo-docs</Tab>
29
- </Tabs>
30
-
31
- ## Code blocks
32
-
33
- `CodeBlock` preserves every newline as a hard code line.
34
-
35
- <CodeBlock language="ts" title="src/config.ts">
36
- {`export const title = "My docs";
37
- export const searchEnabled = true;`}
38
- </CodeBlock>
39
-
40
- ## Mermaid
41
-
42
- <Mermaid>{`flowchart LR
43
- Content --> Build
44
- Build --> Documentation`}</Mermaid>
@@ -1,160 +0,0 @@
1
- {
2
- "openapi": "3.0.4",
3
- "info": {
4
- "title": "Swagger Petstore - OpenAPI 3.0",
5
- "description": "A small, read-only extract of the public Swagger Petstore schema for debugging Heyo Docs. Source: https://petstore3.swagger.io/api/v3/openapi.json",
6
- "version": "1.0.27",
7
- "license": {
8
- "name": "Apache 2.0",
9
- "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
10
- }
11
- },
12
- "servers": [
13
- {
14
- "url": "https://petstore3.swagger.io/api/v3",
15
- "description": "Swagger Petstore public server"
16
- }
17
- ],
18
- "paths": {
19
- "/pet/findByStatus": {
20
- "get": {
21
- "tags": ["pet"],
22
- "summary": "Finds Pets by status.",
23
- "description": "Multiple status values can be provided with comma separated strings.",
24
- "operationId": "findPetsByStatus",
25
- "parameters": [
26
- {
27
- "name": "status",
28
- "in": "query",
29
- "description": "Status values that need to be considered for filter",
30
- "required": true,
31
- "explode": true,
32
- "schema": {
33
- "type": "string",
34
- "default": "available",
35
- "enum": ["available", "pending", "sold"]
36
- }
37
- }
38
- ],
39
- "responses": {
40
- "200": {
41
- "description": "successful operation",
42
- "content": {
43
- "application/json": {
44
- "schema": {
45
- "type": "array",
46
- "items": { "$ref": "#/components/schemas/Pet" }
47
- }
48
- }
49
- }
50
- },
51
- "400": {
52
- "description": "Invalid status value"
53
- },
54
- "default": {
55
- "description": "Unexpected error"
56
- }
57
- }
58
- }
59
- },
60
- "/store/order/{orderId}": {
61
- "get": {
62
- "tags": ["store"],
63
- "summary": "Find purchase order by ID.",
64
- "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.",
65
- "operationId": "getOrderById",
66
- "parameters": [
67
- {
68
- "name": "orderId",
69
- "in": "path",
70
- "description": "ID of order that needs to be fetched.",
71
- "required": true,
72
- "schema": {
73
- "type": "integer",
74
- "format": "int64"
75
- }
76
- }
77
- ],
78
- "responses": {
79
- "200": {
80
- "description": "successful operation",
81
- "content": {
82
- "application/json": {
83
- "schema": { "$ref": "#/components/schemas/Order" }
84
- }
85
- }
86
- },
87
- "400": {
88
- "description": "Invalid ID supplied"
89
- },
90
- "404": {
91
- "description": "Order not found"
92
- },
93
- "default": {
94
- "description": "Unexpected error"
95
- }
96
- }
97
- }
98
- }
99
- },
100
- "components": {
101
- "schemas": {
102
- "Order": {
103
- "type": "object",
104
- "properties": {
105
- "id": { "type": "integer", "format": "int64", "example": 10 },
106
- "petId": {
107
- "type": "integer",
108
- "format": "int64",
109
- "example": 198772
110
- },
111
- "quantity": { "type": "integer", "format": "int32", "example": 7 },
112
- "shipDate": { "type": "string", "format": "date-time" },
113
- "status": {
114
- "type": "string",
115
- "description": "Order Status",
116
- "example": "approved",
117
- "enum": ["placed", "approved", "delivered"]
118
- },
119
- "complete": { "type": "boolean" }
120
- }
121
- },
122
- "Category": {
123
- "type": "object",
124
- "properties": {
125
- "id": { "type": "integer", "format": "int64", "example": 1 },
126
- "name": { "type": "string", "example": "Dogs" }
127
- }
128
- },
129
- "Tag": {
130
- "type": "object",
131
- "properties": {
132
- "id": { "type": "integer", "format": "int64" },
133
- "name": { "type": "string" }
134
- }
135
- },
136
- "Pet": {
137
- "required": ["name", "photoUrls"],
138
- "type": "object",
139
- "properties": {
140
- "id": { "type": "integer", "format": "int64", "example": 10 },
141
- "name": { "type": "string", "example": "doggie" },
142
- "category": { "$ref": "#/components/schemas/Category" },
143
- "photoUrls": {
144
- "type": "array",
145
- "items": { "type": "string" }
146
- },
147
- "tags": {
148
- "type": "array",
149
- "items": { "$ref": "#/components/schemas/Tag" }
150
- },
151
- "status": {
152
- "type": "string",
153
- "description": "pet status in the store",
154
- "enum": ["available", "pending", "sold"]
155
- }
156
- }
157
- }
158
- }
159
- }
160
- }