@lukoweb/apitogo 0.2.56 → 0.2.57

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 (80) hide show
  1. package/dist/cli/cli.js +1026 -540
  2. package/dist/declarations/cli/platform/client/platform-api.d.ts +6 -0
  3. package/dist/declarations/config/validators/ZudokuConfig.d.ts +2 -0
  4. package/dist/declarations/lib/authentication/providers/openid.d.ts +2 -1
  5. package/dist/declarations/lib/plugins/markdown/index.d.ts +2 -1
  6. package/dist/flat-config.d.ts +1 -0
  7. package/docs/cli/commands.md +50 -32
  8. package/docs/cli/go-live.md +66 -93
  9. package/docs/cli/overview.md +18 -17
  10. package/docs/cli/setup.md +130 -141
  11. package/docs/cli/shape.md +94 -11
  12. package/docs/components/slot.mdx +116 -119
  13. package/docs/configuration/api-reference.md +98 -397
  14. package/docs/configuration/authentication.md +118 -159
  15. package/docs/configuration/footer.mdx +89 -118
  16. package/docs/configuration/make-config.mdx +2 -2
  17. package/docs/configuration/overview.md +97 -166
  18. package/docs/configuration/plans.md +100 -110
  19. package/docs/configuration/portal.md +116 -0
  20. package/docs/customization/colors-theme.mdx +255 -278
  21. package/docs/customization/fonts.md +105 -110
  22. package/docs/customization/landing-page.md +189 -188
  23. package/docs/deploy/apitogo.md +13 -17
  24. package/docs/deployment.md +15 -9
  25. package/docs/guides/stripe-setup.mdx +123 -0
  26. package/docs/markdown/frontmatter.md +172 -173
  27. package/docs/mcp/go-live.md +100 -100
  28. package/docs/mcp/overview.md +76 -76
  29. package/docs/quickstart.md +88 -72
  30. package/docs/writing.mdx +68 -72
  31. package/package.json +1 -1
  32. package/src/config/v2/docs-navigation.ts +7 -2
  33. package/src/config/v2/index.ts +1 -0
  34. package/src/config/v2/resolve.ts +28 -0
  35. package/src/config/v2/rules.ts +32 -1
  36. package/src/config/v2/schema.ts +9 -0
  37. package/src/config/v2/services.ts +78 -2
  38. package/src/config/v2/starter-landing.ts +41 -0
  39. package/src/config/v2/wrapper.ts +127 -7
  40. package/src/config/validators/ZudokuConfig.ts +794 -792
  41. package/src/lib/authentication/providers/openid.tsx +6 -1
  42. package/src/lib/plugins/markdown/index.tsx +86 -82
  43. package/src/vite/dev-server.ts +9 -1
  44. package/src/vite/dev-ssr-config.ts +32 -0
  45. package/src/vite/plugin-config.ts +4 -2
  46. package/src/vite/plugin-docs.ts +213 -205
  47. package/docs/concepts/auth-provider-api-identities.md +0 -105
  48. package/docs/configuration/ai-assistants.md +0 -65
  49. package/docs/configuration/api-catalog.md +0 -109
  50. package/docs/configuration/authentication-auth0.md +0 -181
  51. package/docs/configuration/authentication-azure-ad.md +0 -245
  52. package/docs/configuration/authentication-clerk.md +0 -117
  53. package/docs/configuration/authentication-firebase.md +0 -69
  54. package/docs/configuration/authentication-pingfederate.md +0 -143
  55. package/docs/configuration/authentication-supabase.md +0 -233
  56. package/docs/configuration/build-configuration.mdx +0 -147
  57. package/docs/configuration/docs.md +0 -282
  58. package/docs/configuration/llms.md +0 -90
  59. package/docs/configuration/manifest.md +0 -129
  60. package/docs/configuration/navigation.mdx +0 -415
  61. package/docs/configuration/protected-routes.md +0 -150
  62. package/docs/configuration/search.md +0 -164
  63. package/docs/configuration/sentry.mdx +0 -44
  64. package/docs/configuration/site.md +0 -124
  65. package/docs/configuration/slots.mdx +0 -125
  66. package/docs/configuration/vite-config.md +0 -18
  67. package/docs/custom-plugins.md +0 -285
  68. package/docs/deploy/apache-nginx.md +0 -41
  69. package/docs/deploy/cloudflare-pages.md +0 -74
  70. package/docs/deploy/direct-upload.md +0 -17
  71. package/docs/deploy/github-pages.md +0 -49
  72. package/docs/deploy/vercel.md +0 -101
  73. package/docs/extending/events.md +0 -124
  74. package/docs/guides/environment-variables.md +0 -94
  75. package/docs/guides/managing-api-keys-and-identities.md +0 -89
  76. package/docs/guides/navigation-rules.mdx +0 -203
  77. package/docs/guides/processors.mdx +0 -234
  78. package/docs/guides/transforming-examples.md +0 -156
  79. package/docs/guides/using-multiple-apis.md +0 -87
  80. package/docs/plugins.md +0 -24
@@ -1,164 +0,0 @@
1
- ---
2
- title: Search
3
- sidebar_icon: search-code
4
- description:
5
- Learn how to configure and customize search functionality in APIToGo, including setup instructions
6
- for Pagefind and Inkeep providers, result transformation, and ranking options.
7
- ---
8
-
9
- APIToGo offers search functionality that enhances user experience by enabling content discovery
10
- across your site. When configured, a search bar will appear in the header, allowing users to quickly
11
- find relevant information on any page.
12
-
13
- We currently support three search providers:
14
-
15
- - [Pagefind](https://pagefind.app/)
16
- - [Algolia DocSearch](https://docsearch.algolia.com/)
17
- - [Inkeep](https://inkeep.com/)
18
-
19
- ## Pagefind
20
-
21
- [Pagefind](https://pagefind.app/) is a lightweight, static search library that can be used to add
22
- search to your APIToGo site without any external services.
23
-
24
- To enable pagefind search, configure the `search` option in your configuration:
25
-
26
- ```typescript
27
- {
28
- search: {
29
- type: "pagefind",
30
- // Optional: Maximum number of sub results per page
31
- maxSubResults: 3,
32
- // Optional: Configure search result ranking (defaults shown below)
33
- ranking: {
34
- termFrequency: 0.8,
35
- pageLength: 0.6,
36
- termSimilarity: 1.2,
37
- termSaturation: 1.2,
38
- },
39
- }
40
- }
41
- ```
42
-
43
- ### Transforming/Filtering Search Results
44
-
45
- You can transform or filter search results using the `transformResults` option. This function
46
- receives the search result along with the current auth state and context, allowing you to:
47
-
48
- - Filter results based on user permissions
49
- - Modify result content
50
- - Add custom results
51
-
52
- The type of `result` is the same as
53
- [the type returned by Pagefind's search API](https://github.com/Pagefind/pagefind/blob/03552d041d9533b09563f6c50466b25d394ece64/pagefind_web_js/types/index.d.ts#L123-L160).
54
-
55
- ```typescript
56
- {
57
- search: {
58
- type: "pagefind",
59
- transformResults: ({ result, auth, context }) => {
60
- // Return false to filter out the result
61
- if (!auth.isAuthenticated) return false;
62
-
63
- // Return true or undefined to keep the original result
64
- if (result.url.includes("/private/")) return true;
65
-
66
- // Return a modified result
67
- return {
68
- ...result,
69
- title: `${result.title} (${context.meta.title})`
70
- };
71
- }
72
- }
73
- }
74
- ```
75
-
76
- For more information about how Pagefind's ranking system works and how to customize it for your
77
- content, see the [Pagefind ranking documentation](https://pagefind.app/docs/ranking/).
78
-
79
- ## Algolia DocSearch
80
-
81
- [Algolia DocSearch](https://docsearch.algolia.com/) is a free search solution for open-source
82
- documentation sites. You can apply for the free DocSearch program or use your own Algolia account.
83
-
84
- ### Installation
85
-
86
- ```bash
87
- npm install @zudoku/plugin-search-algolia
88
- ```
89
-
90
- The published package name is still `@zudoku/plugin-search-algolia` (APIToGo Algolia search plugin).
91
- Add it via the `plugins` array in your site config.
92
-
93
- ### Configuration
94
-
95
- ```typescript
96
- import { algoliaSearchPlugin } from "@zudoku/plugin-search-algolia";
97
-
98
- export default {
99
- plugins: [
100
- algoliaSearchPlugin({
101
- appId: "YOUR_APP_ID",
102
- apiKey: "YOUR_SEARCH_API_KEY",
103
- indices: ["YOUR_INDEX_NAME"],
104
- }),
105
- ],
106
- };
107
- ```
108
-
109
- You can get your credentials by [applying for DocSearch](https://docsearch.algolia.com/apply/) or
110
- creating an index through the [Algolia dashboard](https://www.algolia.com/dashboard).
111
-
112
- Any additional [DocSearch options](https://docsearch.algolia.com/docs/api/) can be passed alongside
113
- the required fields.
114
-
115
- ## Inkeep
116
-
117
- [Inkeep](https://inkeep.com/) is an AI-powered search and chat platform that can index your
118
- documentation and provide intelligent search capabilities to your users.
119
-
120
- ### Setting up Inkeep Integration
121
-
122
- Before you can use Inkeep search in your APIToGo site, you need to set up an Inkeep integration and
123
- have your site indexed. Here's how to get started:
124
-
125
- #### 1. Create an Inkeep Account
126
-
127
- 1. Go to [Inkeep](https://inkeep.com/) and sign up for an account
128
- 2. Navigate to the [Inkeep Portal](https://portal.inkeep.com/)
129
-
130
- #### 2. Set up Site Indexing
131
-
132
- 1. In the Inkeep Portal, create a new project or integration
133
- 2. Configure your site URL so Inkeep can crawl and index your documentation
134
- 3. Ensure your APIToGo site is deployed and publicly accessible for indexing
135
- 4. Wait for Inkeep to crawl and index your site content (this may take some time)
136
-
137
- #### 3. Get Your Integration Credentials
138
-
139
- To add Inkeep search to your site you will need to copy some variables from your
140
- [Inkeep account setting](https://portal.inkeep.com/):
141
-
142
- - API Key
143
- - Integration ID
144
- - Organization ID
145
-
146
- #### 4. Configure APIToGo
147
-
148
- Once you have your credentials and your site is indexed, you can configure the `search` option in
149
- your [APIToGo Configuration](./overview.md):
150
-
151
- ```typescript
152
- {
153
- // ...
154
- search: {
155
- type: "inkeep",
156
- apiKey: "<your-api-key>",
157
- integrationId: "<your-integration-id>",
158
- organizationId: "<your-organization-id>",
159
- primaryBrandColor: "#26D6FF",
160
- organizationDisplayName: "Your Organization Name",
161
- }
162
- // ...
163
- }
164
- ```
@@ -1,44 +0,0 @@
1
- ---
2
- sidebar_icon: bug
3
- ---
4
-
5
- # Sentry
6
-
7
- Sentry is a popular error tracking tool that helps you monitor and fix crashes in real time. It
8
- provides you with detailed error reports, so you can quickly identify and resolve issues before they
9
- affect your users.
10
-
11
- ## Enable Sentry
12
-
13
- 1. To enable it you have to first install the optional dependency `@sentry/react`.
14
-
15
- ```bash
16
- npm install --save @sentry/react
17
- ```
18
-
19
- 2. And then set the `SENTRY_DSN` environment variable in your APIToGo project.
20
-
21
- ```bash
22
-
23
- SENTRY_DSN=https://your-sentry-dsn
24
- ```
25
-
26
- ## Release management
27
-
28
- However this does not handle release management for you. For that you can
29
- [create a custom `vite.config.ts`](./vite-config) and use the `@sentry/vite-plugin` plugin.
30
-
31
- ```ts
32
- import { sentryVitePlugin } from "@sentry/vite-plugin";
33
- import { defineConfig } from "vite";
34
-
35
- export default defineConfig({
36
- plugins: [
37
- sentryVitePlugin({
38
- authToken: "your-token",
39
- org: "your-org",
40
- project: "your-project",
41
- }),
42
- ],
43
- });
44
- ```
@@ -1,124 +0,0 @@
1
- ---
2
- sidebar_label: Branding & Layout
3
- sidebar_icon: layout-dashboard
4
- description:
5
- Customize your APIToGo site's branding, logo, banner, and layout options with detailed
6
- configuration examples and guidance.
7
- ---
8
-
9
- # Branding & Layout
10
-
11
- We offer you to customize the main aspects of your APIToGo site's appearance and behavior.
12
-
13
- ## Branding
14
-
15
- **Title**, **logo** can be configured in under the `site` property:
16
-
17
- ```tsx title=config
18
- const config = {
19
- site: {
20
- title: "My API Documentation",
21
- logo: {
22
- src: {
23
- light: "/path/to/light-logo.png",
24
- dark: "/path/to/dark-logo.png",
25
- },
26
- alt: "Company Logo",
27
- href: "/",
28
- },
29
- // Other options...
30
- },
31
- };
32
- ```
33
-
34
- ### Available Options
35
-
36
- #### Title
37
-
38
- Set the title of your site next to the logo in the header:
39
-
40
- ```tsx title=config
41
- {
42
- site: {
43
- title: "My API Documentation",
44
- }
45
- }
46
- ```
47
-
48
- #### Logo
49
-
50
- Configure the site's logo with different versions for light and dark themes:
51
-
52
- ```tsx title=config
53
- {
54
- site: {
55
- logo: {
56
- src: {
57
- light: "/light-logo.png",
58
- dark: "/dark-logo.png"
59
- },
60
- alt: "Company Logo",
61
- width: "120px", // optional width
62
- href: "/", // optional link target (defaults to "/")
63
- reloadDocument: true, // optional, defaults to true
64
- }
65
- }
66
- }
67
- ```
68
-
69
- The `reloadDocument` option controls whether clicking the logo triggers a full page reload (`true`,
70
- the default) or uses client-side SPA navigation (`false`). A full reload is useful when your landing
71
- page is served by a different system (e.g. a CMS) outside of APIToGo.
72
-
73
- #### Colors & Theme
74
-
75
- We allow you to fully customize all colors, borders, etc - read more about it in
76
- [Colors & Themes](/docs/customization/colors-theme)
77
-
78
- ## Layout
79
-
80
- ### Banner
81
-
82
- Add a banner message to the top of the page:
83
-
84
- ```tsx title=config
85
- {
86
- site: {
87
- banner: {
88
- message: "Welcome to our beta documentation!",
89
- color: "info", // "note" | "tip" | "info" | "caution" | "danger" or custom
90
- dismissible: true
91
- }
92
- }
93
- }
94
- ```
95
-
96
- ### Footer
97
-
98
- The footer configuration has its own dedicated section. See the [Footer Configuration](./footer) for
99
- details.
100
-
101
- ## Complete Example
102
-
103
- Here's a comprehensive example showing all available page configuration options:
104
-
105
- ```tsx title=config
106
- {
107
- site: {
108
- title: "My API Documentation",
109
- logo: {
110
- src: {
111
- light: "/images/logo-light.svg",
112
- dark: "/images/logo-dark.svg"
113
- },
114
- alt: "Company Logo",
115
- width: "100px",
116
- },
117
- banner: {
118
- message: "Welcome to our documentation!",
119
- color: "info",
120
- dismissible: true
121
- },
122
- }
123
- }
124
- ```
@@ -1,125 +0,0 @@
1
- ---
2
- title: Slots
3
- sidebar_icon: between-horizontal-start
4
- description:
5
- Learn how to use slots to inject custom content into predefined locations throughout your APIToGo
6
- site.
7
- ---
8
-
9
- Slots provide a powerful way to inject custom content into predefined locations throughout APIToGo.
10
- They allow you to extend the default layout and functionality without modifying the core components.
11
-
12
- ## Configuration
13
-
14
- You can define slots in your `apitogo.config.json` file using the `slots` property:
15
-
16
- ```tsx
17
- import type { ApitogoConfig } from "@lukoweb/apitogo";
18
- import { Button } from "@lukoweb/apitogo/ui/Button.js";
19
-
20
- const config: ApitogoConfig = {
21
- // ... other config
22
- slots: {
23
- "head-navigation-end": () => (
24
- <div className="flex items-center gap-2">
25
- <Button variant="ghost" size="icon" asChild>
26
- <a href="https://github.com/your-repo">
27
- <GithubIcon className="w-4 h-4" />
28
- </a>
29
- </Button>
30
- </div>
31
- ),
32
- "footer-before": <div>Custom footer content</div>,
33
- },
34
- };
35
-
36
- export default config;
37
- ```
38
-
39
- ## Slot Types
40
-
41
- Slots accept either:
42
-
43
- - **React components/elements**: JSX elements
44
- - **Function components**: Functions that return JSX elements and receive routing props
45
-
46
- ```tsx
47
- slots: {
48
- // JSX element
49
- "footer-after": <CustomFooter />,
50
-
51
- // Function with access to routing props
52
- "head-navigation-end": ({ navigate, location, searchParams }) => (
53
- <Button
54
- onClick={() => navigate('/settings')}
55
- variant={location.pathname === '/settings' ? 'default' : 'ghost'}
56
- >
57
- Settings
58
- </Button>
59
- ),
60
- }
61
- ```
62
-
63
- Functions receive an object with routing properties:
64
-
65
- - `location` - Current route location
66
- - `navigate` - Navigation function
67
- - `searchParams` - URL search parameters
68
- - `setSearchParams` - Function to update search parameters
69
- - `params` - Route parameters
70
-
71
- ## Type Safety
72
-
73
- APIToGo provides full TypeScript support for slot names. All predefined slot names will show up with
74
- autocomplete when you type them in your configuration.
75
-
76
- ## Advanced Usage
77
-
78
- For more advanced slot usage, including programmatic slot management, dynamic content, and adding
79
- custom slot names, see the [Slot Component](/docs/components/slot) documentation.
80
-
81
- ## Examples
82
-
83
- ### Adding Social Links to Header
84
-
85
- ```tsx
86
- slots: {
87
- "head-navigation-end": () => (
88
- <div className="flex items-center gap-2">
89
- <Button variant="ghost" size="icon" asChild>
90
- <a href="https://github.com/your-org" target="_blank">
91
- <GithubIcon className="w-4 h-4" />
92
- </a>
93
- </Button>
94
- <Button variant="ghost" size="icon" asChild>
95
- <a href="https://discord.gg/your-server" target="_blank">
96
- <DiscordIcon className="w-4 h-4" />
97
- </a>
98
- </Button>
99
- </div>
100
- ),
101
- }
102
- ```
103
-
104
- ### Dynamic Content with Routing
105
-
106
- ```tsx
107
- slots: {
108
- "top-navigation-side": ({ location, navigate }) => (
109
- <div className="flex items-center gap-2">
110
- <Button
111
- variant={location.pathname === '/docs' ? 'default' : 'ghost'}
112
- onClick={() => navigate('/docs')}
113
- >
114
- Documentation
115
- </Button>
116
- <Button
117
- variant={location.pathname === '/api' ? 'default' : 'ghost'}
118
- onClick={() => navigate('/api')}
119
- >
120
- API Reference
121
- </Button>
122
- </div>
123
- ),
124
- }
125
- ```
@@ -1,18 +0,0 @@
1
- ---
2
- title: Vite Config
3
- sidebar_icon: server-crash
4
- ---
5
-
6
- APIToGo is built on top of [Vite](https://vite.dev/) and can be customized using a
7
- [Vite configuration file](https://vite.dev/config/) if advanced functionality is required.
8
-
9
- Not all configurations are supported in APIToGo, but common tasks like adding plugins will generally
10
- work as expected. Simply create a `vite.config.ts` file in the root of your project and set the
11
- configuration options as needed.
12
-
13
- APIToGo will automatically pick up the configuration file and will use it to augment the built-in
14
- configuration.
15
-
16
- You can find an
17
- [example project](https://github.com/lukoweb/apitogo-doc-tool/tree/main/examples/with-vite-config)
18
- on GitHub that demonstrates how to use a custom Vite configuration with APIToGo.