doccupine 0.0.102 → 0.0.104
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/dist/index.js +7 -0
- package/dist/lib/layout.js +1 -0
- package/dist/lib/structures.js +5 -1
- package/dist/lib/types.d.ts +2 -0
- package/dist/templates/app/not-found.d.ts +1 -1
- package/dist/templates/app/not-found.js +2 -6
- package/dist/templates/components/Docs.d.ts +1 -1
- package/dist/templates/components/Docs.js +10 -14
- package/dist/templates/components/MDXComponents.d.ts +1 -1
- package/dist/templates/components/MDXComponents.js +16 -15
- package/dist/templates/components/SectionNavProvider.d.ts +1 -1
- package/dist/templates/components/SectionNavProvider.js +8 -1
- package/dist/templates/components/SideBar.d.ts +1 -1
- package/dist/templates/components/SideBar.js +136 -19
- package/dist/templates/components/layout/DocsComponents.d.ts +1 -1
- package/dist/templates/components/layout/DocsComponents.js +124 -6
- package/dist/templates/components/layout/DocsNavigation.d.ts +1 -1
- package/dist/templates/components/layout/DocsNavigation.js +27 -12
- package/dist/templates/components/layout/Footer.d.ts +1 -1
- package/dist/templates/components/layout/Footer.js +7 -0
- package/dist/templates/components/layout/Header.d.ts +1 -1
- package/dist/templates/components/layout/Header.js +3 -0
- package/dist/templates/components/layout/NotFound.d.ts +1 -0
- package/dist/templates/components/layout/NotFound.js +76 -0
- package/dist/templates/components/layout/SectionBar.d.ts +1 -1
- package/dist/templates/components/layout/SectionBar.js +9 -0
- package/dist/templates/components/layout/SharedStyles.d.ts +1 -1
- package/dist/templates/components/layout/SharedStyles.js +24 -0
- package/dist/templates/components/layout/Slug.d.ts +1 -0
- package/dist/templates/components/layout/Slug.js +32 -0
- package/dist/templates/components/layout/Steps.d.ts +1 -1
- package/dist/templates/components/layout/Steps.js +2 -1
- package/dist/templates/components/layout/Tabs.d.ts +1 -1
- package/dist/templates/components/layout/Tabs.js +11 -0
- package/dist/templates/components/layout/Update.d.ts +1 -1
- package/dist/templates/components/layout/Update.js +19 -14
- package/dist/templates/mdx/components.mdx.d.ts +1 -1
- package/dist/templates/mdx/components.mdx.js +1 -0
- package/dist/templates/mdx/globals.mdx.d.ts +1 -1
- package/dist/templates/mdx/globals.mdx.js +1 -0
- package/dist/templates/mdx/index.mdx.d.ts +1 -1
- package/dist/templates/mdx/index.mdx.js +1 -0
- package/dist/templates/mdx/navigation.mdx.d.ts +1 -1
- package/dist/templates/mdx/navigation.mdx.js +69 -1
- package/dist/templates/mdx/platform/build-and-deploy.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/build-and-deploy.mdx.js +1 -0
- package/dist/templates/mdx/platform/file-editor.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/file-editor.mdx.js +1 -0
- package/dist/templates/mdx/platform/index.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/index.mdx.js +1 -0
- package/dist/templates/mdx/platform/project-settings.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/project-settings.mdx.js +1 -0
- package/dist/templates/mdx/platform/site-settings.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/site-settings.mdx.js +1 -0
- package/dist/templates/mdx/tabs.mdx.d.ts +1 -1
- package/dist/templates/mdx/tabs.mdx.js +13 -6
- package/dist/templates/utils/orderNavItems.d.ts +1 -1
- package/dist/templates/utils/orderNavItems.js +11 -0
- package/package.json +1 -1
|
@@ -4,8 +4,10 @@ import { styledText } from "cherry-styled-components";
|
|
|
4
4
|
import React, { useState, ReactNode } from "react";
|
|
5
5
|
import styled, { css } from "styled-components";
|
|
6
6
|
import { thinScrollbar } from "@/components/layout/SharedStyled";
|
|
7
|
+
import { Icon } from "@/components/layout/Icon";
|
|
7
8
|
interface TabContentProps {
|
|
8
9
|
title: string;
|
|
10
|
+
icon?: string;
|
|
9
11
|
children: ReactNode;
|
|
10
12
|
}
|
|
11
13
|
interface TabsProps {
|
|
@@ -28,6 +30,10 @@ const TabsList = styled.div<{ theme: Theme }>\`
|
|
|
28
30
|
\`;
|
|
29
31
|
const TabButton = styled.button<{ theme: Theme; $isActive?: boolean }>\`
|
|
30
32
|
flex: 1;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
gap: 8px;
|
|
31
37
|
padding: 12px 20px;
|
|
32
38
|
border: none;
|
|
33
39
|
background: \${({ theme }) => theme.colors.light};
|
|
@@ -38,6 +44,10 @@ const TabButton = styled.button<{ theme: Theme; $isActive?: boolean }>\`
|
|
|
38
44
|
\${({ theme }) => styledText(theme)};
|
|
39
45
|
color: \${({ theme }) => theme.colors.dark};
|
|
40
46
|
font-weight: 600;
|
|
47
|
+
|
|
48
|
+
& svg {
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
}
|
|
41
51
|
\${({ theme, $isActive }) =>
|
|
42
52
|
$isActive &&
|
|
43
53
|
css\`
|
|
@@ -105,6 +115,7 @@ const Tabs: React.FC<TabsProps> = ({ children }) => {
|
|
|
105
115
|
onClick={() => setActiveTab(index)}
|
|
106
116
|
type="button"
|
|
107
117
|
>
|
|
118
|
+
{tab.props.icon && <Icon name={tab.props.icon} size={18} />}
|
|
108
119
|
{tab.props.title}
|
|
109
120
|
</TabButton>
|
|
110
121
|
))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const updateTemplate = "\"use client\";\nimport styled from \"styled-components\";\nimport { styledSmall } from \"cherry-styled-components\";\nimport { mq, Theme } from \"@/app/theme\";\n\nconst StyledUpdate = styled.div<{ theme: Theme; $columns?: number }>`\n position: relative;\n display: flex;\n gap: 20px;\n flex-direction: column;\n\n ${mq(\"lg\")} {\n margin: 20px 0;\n flex-direction: row;\n }\n`;\n\nconst StyledUpdateLabel = styled.
|
|
1
|
+
export declare const updateTemplate = "\"use client\";\nimport styled from \"styled-components\";\nimport { styledSmall } from \"cherry-styled-components\";\nimport { mq, Theme } from \"@/app/theme\";\nimport { slugify } from \"@/components/layout/Slug\";\n\nconst StyledUpdate = styled.div<{ theme: Theme; $columns?: number }>`\n position: relative;\n display: flex;\n gap: 20px;\n flex-direction: column;\n\n ${mq(\"lg\")} {\n margin: 20px 0;\n flex-direction: row;\n }\n`;\n\nconst StyledUpdateLabel = styled.a<{ theme: Theme }>`\n display: inline-block;\n width: fit-content;\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 20%, transparent)`};\n color: ${({ theme }) => theme.colors.primary};\n padding: 2px 4px;\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n font-weight: 600;\n text-decoration: none;\n ${({ theme }) => styledSmall(theme)};\n\n &:hover {\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 35%, transparent)`};\n }\n`;\n\nconst StyledUpdateDescription = styled.div<{ theme: Theme }>`\n ${({ theme }) => styledSmall(theme)};\n color: ${({ theme }) => theme.colors.gray};\n`;\n\nconst StyledUpdateSidebar = styled.div`\n display: flex;\n flex-direction: column;\n gap: 10px;\n\n ${mq(\"lg\")} {\n min-width: 160px;\n }\n`;\n\nconst StyledUpdateChildren = styled.div`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 20px;\n`;\n\ninterface UpdateProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n label: string;\n description: string;\n}\n\nfunction Update({ children, label, description, id }: UpdateProps) {\n // MDXComponents injects a de-duplicated id from the shared slugger so the\n // index sidebar anchor resolves here; fall back to a plain slug when used\n // outside the MDX pipeline. The label doubles as an anchor so readers can\n // right-click to copy the deep link (native #anchor jump is offset by the\n // global scroll-padding-top).\n const anchor = id ?? slugify(label);\n return (\n <StyledUpdate id={anchor}>\n <StyledUpdateSidebar>\n <div>\n <StyledUpdateLabel href={`#${anchor}`}>{label}</StyledUpdateLabel>\n </div>\n <StyledUpdateDescription>{description}</StyledUpdateDescription>\n </StyledUpdateSidebar>\n <StyledUpdateChildren>{children}</StyledUpdateChildren>\n </StyledUpdate>\n );\n}\n\nexport { Update };\n";
|
|
@@ -2,6 +2,7 @@ export const updateTemplate = `"use client";
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { styledSmall } from "cherry-styled-components";
|
|
4
4
|
import { mq, Theme } from "@/app/theme";
|
|
5
|
+
import { slugify } from "@/components/layout/Slug";
|
|
5
6
|
|
|
6
7
|
const StyledUpdate = styled.div<{ theme: Theme; $columns?: number }>\`
|
|
7
8
|
position: relative;
|
|
@@ -15,14 +16,22 @@ const StyledUpdate = styled.div<{ theme: Theme; $columns?: number }>\`
|
|
|
15
16
|
}
|
|
16
17
|
\`;
|
|
17
18
|
|
|
18
|
-
const StyledUpdateLabel = styled.
|
|
19
|
+
const StyledUpdateLabel = styled.a<{ theme: Theme }>\`
|
|
20
|
+
display: inline-block;
|
|
21
|
+
width: fit-content;
|
|
19
22
|
background: \${({ theme }) =>
|
|
20
23
|
\`color-mix(in srgb, \${theme.colors.primaryLight} 20%, transparent)\`};
|
|
21
24
|
color: \${({ theme }) => theme.colors.primary};
|
|
22
25
|
padding: 2px 4px;
|
|
23
26
|
border-radius: \${({ theme }) => theme.spacing.radius.xs};
|
|
24
27
|
font-weight: 600;
|
|
28
|
+
text-decoration: none;
|
|
25
29
|
\${({ theme }) => styledSmall(theme)};
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
background: \${({ theme }) =>
|
|
33
|
+
\`color-mix(in srgb, \${theme.colors.primaryLight} 35%, transparent)\`};
|
|
34
|
+
}
|
|
26
35
|
\`;
|
|
27
36
|
|
|
28
37
|
const StyledUpdateDescription = styled.div<{ theme: Theme }>\`
|
|
@@ -53,22 +62,18 @@ interface UpdateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
53
62
|
description: string;
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
.trim();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function Update({ children, label, description }: UpdateProps) {
|
|
65
|
+
function Update({ children, label, description, id }: UpdateProps) {
|
|
66
|
+
// MDXComponents injects a de-duplicated id from the shared slugger so the
|
|
67
|
+
// index sidebar anchor resolves here; fall back to a plain slug when used
|
|
68
|
+
// outside the MDX pipeline. The label doubles as an anchor so readers can
|
|
69
|
+
// right-click to copy the deep link (native #anchor jump is offset by the
|
|
70
|
+
// global scroll-padding-top).
|
|
71
|
+
const anchor = id ?? slugify(label);
|
|
67
72
|
return (
|
|
68
|
-
<StyledUpdate id={
|
|
73
|
+
<StyledUpdate id={anchor}>
|
|
69
74
|
<StyledUpdateSidebar>
|
|
70
75
|
<div>
|
|
71
|
-
<StyledUpdateLabel>{label}</StyledUpdateLabel>
|
|
76
|
+
<StyledUpdateLabel href={\`#\${anchor}\`}>{label}</StyledUpdateLabel>
|
|
72
77
|
</div>
|
|
73
78
|
<StyledUpdateDescription>{description}</StyledUpdateDescription>
|
|
74
79
|
</StyledUpdateSidebar>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const componentsMdxTemplate = "---\ntitle: \"Components\"\ndescription: \"Explore the full library of built-in components available in your documentation pages.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 0\n---\n\n# Components\n\nDoccupine includes a rich set of built-in components you can use directly in your MDX files - no imports needed. Browse the full library below.\n\n<Columns cols={3}>\n <Card title=\"Headers and Text\" icon=\"heading\" href=\"/headers-and-text\">\n Headings, paragraphs, bold, italic, links, and other text formatting.\n </Card>\n <Card title=\"Lists and Tables\" icon=\"list\" href=\"/lists-and-tables\">\n Ordered lists, unordered lists, and data tables.\n </Card>\n <Card title=\"Code\" icon=\"code\" href=\"/code\">\n Inline code, fenced code blocks, and syntax highlighting.\n </Card>\n <Card title=\"Accordion\" icon=\"chevrons-down\" href=\"/accordion\">\n Collapsible sections for organizing lengthy content.\n </Card>\n <Card title=\"Tabs\" icon=\"panel-top\" href=\"/tabs\">\n Tabbed interfaces for grouping related content.\n </Card>\n <Card title=\"Cards\" icon=\"square\" href=\"/cards\">\n Visual containers for content, icons, and links.\n </Card>\n <Card title=\"Buttons\" icon=\"mouse-pointer-click\" href=\"/buttons\">\n Action components with variants, sizes, and icons.\n </Card>\n <Card title=\"Callouts\" icon=\"megaphone\" href=\"/callouts\">\n Highlighted blocks for tips, warnings, and important notes.\n </Card>\n <Card title=\"Images and Embeds\" icon=\"image\" href=\"/images-and-embeds\">\n Images, videos, and embedded content.\n </Card>\n <Card title=\"Icons\" icon=\"smile\" href=\"/icons\">\n Lucide icons you can use anywhere in your docs.\n </Card>\n <Card title=\"Fields\" icon=\"text-cursor-input\" href=\"/fields\">\n Property and parameter documentation blocks.\n </Card>\n <Card title=\"Update\" icon=\"bell\" href=\"/update\">\n Changelog and update announcement blocks.\n </Card>\n <Card title=\"Columns\" icon=\"columns-3\" href=\"/columns\">\n Grid layouts for arranging cards and content side by side.\n </Card>\n <Card title=\"Steps\" icon=\"footprints\" href=\"/steps\">\n Numbered step-by-step guides and walkthroughs.\n </Card>\n <Card title=\"Color Swatches\" icon=\"palette\" href=\"/color-swatches\">\n Visual color palette swatches to document your theme colors.\n </Card>\n</Columns>";
|
|
1
|
+
export declare const componentsMdxTemplate = "---\ntitle: \"Components\"\ndescription: \"Explore the full library of built-in components available in your documentation pages.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\ncategoryIcon: \"blocks\"\norder: 0\n---\n\n# Components\n\nDoccupine includes a rich set of built-in components you can use directly in your MDX files - no imports needed. Browse the full library below.\n\n<Columns cols={3}>\n <Card title=\"Headers and Text\" icon=\"heading\" href=\"/headers-and-text\">\n Headings, paragraphs, bold, italic, links, and other text formatting.\n </Card>\n <Card title=\"Lists and Tables\" icon=\"list\" href=\"/lists-and-tables\">\n Ordered lists, unordered lists, and data tables.\n </Card>\n <Card title=\"Code\" icon=\"code\" href=\"/code\">\n Inline code, fenced code blocks, and syntax highlighting.\n </Card>\n <Card title=\"Accordion\" icon=\"chevrons-down\" href=\"/accordion\">\n Collapsible sections for organizing lengthy content.\n </Card>\n <Card title=\"Tabs\" icon=\"panel-top\" href=\"/tabs\">\n Tabbed interfaces for grouping related content.\n </Card>\n <Card title=\"Cards\" icon=\"square\" href=\"/cards\">\n Visual containers for content, icons, and links.\n </Card>\n <Card title=\"Buttons\" icon=\"mouse-pointer-click\" href=\"/buttons\">\n Action components with variants, sizes, and icons.\n </Card>\n <Card title=\"Callouts\" icon=\"megaphone\" href=\"/callouts\">\n Highlighted blocks for tips, warnings, and important notes.\n </Card>\n <Card title=\"Images and Embeds\" icon=\"image\" href=\"/images-and-embeds\">\n Images, videos, and embedded content.\n </Card>\n <Card title=\"Icons\" icon=\"smile\" href=\"/icons\">\n Lucide icons you can use anywhere in your docs.\n </Card>\n <Card title=\"Fields\" icon=\"text-cursor-input\" href=\"/fields\">\n Property and parameter documentation blocks.\n </Card>\n <Card title=\"Update\" icon=\"bell\" href=\"/update\">\n Changelog and update announcement blocks.\n </Card>\n <Card title=\"Columns\" icon=\"columns-3\" href=\"/columns\">\n Grid layouts for arranging cards and content side by side.\n </Card>\n <Card title=\"Steps\" icon=\"footprints\" href=\"/steps\">\n Numbered step-by-step guides and walkthroughs.\n </Card>\n <Card title=\"Color Swatches\" icon=\"palette\" href=\"/color-swatches\">\n Visual color palette swatches to document your theme colors.\n </Card>\n</Columns>";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const globalsMdxTemplate = "---\ntitle: \"Globals\"\ndescription: \"Configure global settings for your documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 1\n---\n\n# Global Configuration\n\nUse a `config.json` file to define project\u2011wide metadata for your documentation site. These values are applied to every generated page unless a page overrides them in its own frontmatter.\n\n## config.json\n\nPlace a `config.json` at your project root (the same folder where you execute `npx doccupine`) to define global metadata for your documentation site.\n\n```json\n{\n \"name\": \"Doccupine\",\n \"description\": \"Doccupine is a free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.\",\n \"icon\": \"https://docs.doccupine.com/favicon.ico\",\n \"image\": \"https://docs.doccupine.com/preview.png\",\n \"url\": \"https://docs.example.com\"\n}\n```\n\n## Fields\n\nAll fields are optional. Doccupine uses sensible defaults when a field is not set.\n\n- **name**: The primary name of your documentation website. Displayed in the site title and used in various UI elements.\n- **description**: A concise summary of your project, used in site metadata (e.g., HTML meta description) and social previews when not overridden.\n- **icon**: The favicon for your site. You can provide a full URL or a relative path to an asset in your project.\n- **image**: The Open Graph image used when links to your docs are shared on social platforms. Accepts a full URL or a relative path.\n- **url**: The public URL of your deployed site. Used as the base URL for `sitemap.xml` and `robots.txt`. When omitted, no sitemap is generated. Can be overridden at deploy time with the `NEXT_PUBLIC_SITE_URL` environment variable.\n\n## Per-page overrides\n\nAny page can override global values by defining the matching key in its frontmatter. When present, the page's value takes precedence over `config.json` for that page only.\n\n| Frontmatter field | Overrides | Effect |\n| ----------------- | ------------- | ----------------------------------------------------------- |\n| **title** | - | Page title in metadata and Open Graph |\n| **description** | `description` | Meta description and Open Graph description |\n| **name** | `name` | Site name shown in the title suffix (e.g. \"Page - My Docs\") |\n| **icon** | `icon` | Favicon for this page |\n| **image** | `image` | Open Graph preview image |\n| **section** | - | Assigns the page to a [section](/sections) |\n| **sectionOrder** | - | Controls section position in the tab bar |\n| **sectionLabel** | - | Renames the default \"Docs\" tab (use on `index.mdx`) |\n\n<Callout type=\"note\">\n If a key is not specified in a page's frontmatter, Doccupine falls back to the corresponding value in `config.json`.\n</Callout>\n\nExample frontmatter in an `.mdx` file:\n\n```text\n---\ntitle: \"My Feature\"\ndescription: \"A focused description just for this page.\"\nname: \"My Product Docs\"\nicon: \"/custom-favicon.ico\"\nimage: \"/custom-preview.png\"\ndate: \"2026-02-19\"\ncategory: \"Guides\"\n---\n```";
|
|
1
|
+
export declare const globalsMdxTemplate = "---\ntitle: \"Globals\"\ndescription: \"Configure global settings for your documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\ncategoryIcon: \"settings\"\norder: 1\n---\n\n# Global Configuration\n\nUse a `config.json` file to define project\u2011wide metadata for your documentation site. These values are applied to every generated page unless a page overrides them in its own frontmatter.\n\n## config.json\n\nPlace a `config.json` at your project root (the same folder where you execute `npx doccupine`) to define global metadata for your documentation site.\n\n```json\n{\n \"name\": \"Doccupine\",\n \"description\": \"Doccupine is a free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.\",\n \"icon\": \"https://docs.doccupine.com/favicon.ico\",\n \"image\": \"https://docs.doccupine.com/preview.png\",\n \"url\": \"https://docs.example.com\"\n}\n```\n\n## Fields\n\nAll fields are optional. Doccupine uses sensible defaults when a field is not set.\n\n- **name**: The primary name of your documentation website. Displayed in the site title and used in various UI elements.\n- **description**: A concise summary of your project, used in site metadata (e.g., HTML meta description) and social previews when not overridden.\n- **icon**: The favicon for your site. You can provide a full URL or a relative path to an asset in your project.\n- **image**: The Open Graph image used when links to your docs are shared on social platforms. Accepts a full URL or a relative path.\n- **url**: The public URL of your deployed site. Used as the base URL for `sitemap.xml` and `robots.txt`. When omitted, no sitemap is generated. Can be overridden at deploy time with the `NEXT_PUBLIC_SITE_URL` environment variable.\n\n## Per-page overrides\n\nAny page can override global values by defining the matching key in its frontmatter. When present, the page's value takes precedence over `config.json` for that page only.\n\n| Frontmatter field | Overrides | Effect |\n| ----------------- | ------------- | ----------------------------------------------------------- |\n| **title** | - | Page title in metadata and Open Graph |\n| **description** | `description` | Meta description and Open Graph description |\n| **name** | `name` | Site name shown in the title suffix (e.g. \"Page - My Docs\") |\n| **icon** | `icon` | Favicon for this page |\n| **image** | `image` | Open Graph preview image |\n| **section** | - | Assigns the page to a [section](/sections) |\n| **sectionOrder** | - | Controls section position in the tab bar |\n| **sectionLabel** | - | Renames the default \"Docs\" tab (use on `index.mdx`) |\n\n<Callout type=\"note\">\n If a key is not specified in a page's frontmatter, Doccupine falls back to the corresponding value in `config.json`.\n</Callout>\n\nExample frontmatter in an `.mdx` file:\n\n```text\n---\ntitle: \"My Feature\"\ndescription: \"A focused description just for this page.\"\nname: \"My Product Docs\"\nicon: \"/custom-favicon.ico\"\nimage: \"/custom-preview.png\"\ndate: \"2026-02-19\"\ncategory: \"Guides\"\n---\n```";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const indexMdxTemplate = "---\ntitle: \"Introduction\"\ndescription: \"Doccupine is a free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.\"\ndate: \"2026-02-19\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\norder: 0\n---\n\n# Welcome to Doccupine\n\nDoccupine turns a folder of MDX files into a beautiful, production-ready documentation website. Write in standard Markdown, use any of the built-in components, and get a fully themed site with AI-powered search and automatic navigation - all from one command.\n\n```bash\nnpx doccupine\n```\n\nThat's it. Doccupine prompts you for a source directory, generates your site, and starts a dev server at `http://localhost:3000`. Every edit rebuilds instantly.\n\n<Callout type=\"info\">\n Want a managed experience instead? The [Doccupine Platform](/platform) gives you a browser-based editor, one-click publishing, custom domains, and team collaboration - no local setup needed.\n</Callout>\n\n## How it works\n\nYou write `.mdx` files using Markdown and built-in components like this one. Doccupine watches your files, generates pages, builds the sidebar from your frontmatter, and handles theming, AI chat, and deployment config for you.\n\nEverything on this page - the callout above, the cards below, the code block - is a live example of what your docs can look like out of the box.\n\n<Columns cols={2}>\n <Card title=\"Start writing\" icon=\"pencil\" href=\"/components\">\n Rich docs from day one. 14+ components work out of the box - no imports needed.\n </Card>\n <Card title=\"Ship it\" icon=\"rocket\" href=\"/deployment-and-hosting\">\n Deploy to the Doccupine Platform or self-host on any platform that supports Next.js.\n </Card>\n</Columns>\n\n## Configure your site\n\nDoccupine works with no configuration, but when you're ready to customize, everything is controlled through simple JSON files in your project root.\n\n- [Global settings](/globals) - Site name, description, favicon, and preview image via `config.json`\n- [Navigation](/navigation) - Override the auto-generated sidebar with `navigation.json`\n- [Theme](/theme) - Colors, logos, and dark mode palette via `theme.json`\n- [Fonts](/fonts) - Google Fonts or local font files via `fonts.json`\n- [AI Assistant](/ai-assistant) - Enable the built-in chat with your own API key\n- [MCP Server](/model-context-protocol) - Let AI tools search your docs through `/api/mcp`";
|
|
1
|
+
export declare const indexMdxTemplate = "---\ntitle: \"Introduction\"\ndescription: \"Doccupine is a free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.\"\ndate: \"2026-02-19\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\ncategoryIcon: \"rocket\"\norder: 0\n---\n\n# Welcome to Doccupine\n\nDoccupine turns a folder of MDX files into a beautiful, production-ready documentation website. Write in standard Markdown, use any of the built-in components, and get a fully themed site with AI-powered search and automatic navigation - all from one command.\n\n```bash\nnpx doccupine\n```\n\nThat's it. Doccupine prompts you for a source directory, generates your site, and starts a dev server at `http://localhost:3000`. Every edit rebuilds instantly.\n\n<Callout type=\"info\">\n Want a managed experience instead? The [Doccupine Platform](/platform) gives you a browser-based editor, one-click publishing, custom domains, and team collaboration - no local setup needed.\n</Callout>\n\n## How it works\n\nYou write `.mdx` files using Markdown and built-in components like this one. Doccupine watches your files, generates pages, builds the sidebar from your frontmatter, and handles theming, AI chat, and deployment config for you.\n\nEverything on this page - the callout above, the cards below, the code block - is a live example of what your docs can look like out of the box.\n\n<Columns cols={2}>\n <Card title=\"Start writing\" icon=\"pencil\" href=\"/components\">\n Rich docs from day one. 14+ components work out of the box - no imports needed.\n </Card>\n <Card title=\"Ship it\" icon=\"rocket\" href=\"/deployment-and-hosting\">\n Deploy to the Doccupine Platform or self-host on any platform that supports Next.js.\n </Card>\n</Columns>\n\n## Configure your site\n\nDoccupine works with no configuration, but when you're ready to customize, everything is controlled through simple JSON files in your project root.\n\n- [Global settings](/globals) - Site name, description, favicon, and preview image via `config.json`\n- [Navigation](/navigation) - Override the auto-generated sidebar with `navigation.json`\n- [Theme](/theme) - Colors, logos, and dark mode palette via `theme.json`\n- [Fonts](/fonts) - Google Fonts or local font files via `fonts.json`\n- [AI Assistant](/ai-assistant) - Enable the built-in chat with your own API key\n- [MCP Server](/model-context-protocol) - Let AI tools search your docs through `/api/mcp`";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const navigationMdxTemplate = "---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 2\n---\n\n# Navigation\n\nDoccupine builds your sidebar automatically from your MDX pages. By default, it reads the page frontmatter and groups pages into categories in the order you define. For larger docs, you can take full control with a `navigation.json` file.\n\n## Automatic navigation (default)\n\nWhen no custom navigation is provided, Doccupine generates a structure based on each page's frontmatter.\n\n### Frontmatter fields\n\n- **category**: The category name that groups the page in the sidebar.\n- **categoryOrder**: The position of the category within the sidebar. Lower numbers appear first.\n- **order**: The position of the page within its category. Lower numbers appear first.\n\n### Example frontmatter\n\n```text\n---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2025-01-15\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 2\n---\n```\n\nThis approach is great for small sets of documents. For larger projects, setting these fields on every page can become repetitive.\n\n## Custom navigation with navigation.json\n\nTo centrally define the entire sidebar, create a `navigation.json` at your project root (the same folder where you execute `npx doccupine`). When present, it takes priority over page frontmatter and fully controls the navigation structure.\n\n### Array format\n\nThe simplest format is an array of categories. When using [sections](/sections), this applies to the root section only.\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n },\n {\n \"label\": \"Components\",\n \"links\": [\n { \"slug\": \"components\", \"title\": \"Components\" },\n { \"slug\": \"headers-and-text\", \"title\": \"Headers and Text\" },\n { \"slug\": \"lists-and-tables\", \"title\": \"Lists and tables\" },\n { \"slug\": \"code\", \"title\": \"Code\" },\n { \"slug\": \"accordion\", \"title\": \"Accordion\" },\n { \"slug\": \"tabs\", \"title\": \"Tabs\" },\n { \"slug\": \"cards\", \"title\": \"Cards\" },\n { \"slug\": \"buttons\", \"title\": \"Buttons\" },\n { \"slug\": \"callouts\", \"title\": \"Callouts\" },\n { \"slug\": \"image-and-embeds\", \"title\": \"Images and embeds\" },\n { \"slug\": \"icons\", \"title\": \"Icons\" },\n { \"slug\": \"fields\", \"title\": \"Fields\" },\n { \"slug\": \"update\", \"title\": \"Update\" },\n { \"slug\": \"columns\", \"title\": \"Columns\" },\n { \"slug\": \"steps\", \"title\": \"Steps\" },\n { \"slug\": \"color-swatches\", \"title\": \"Color Swatches\" }\n ]\n },\n {\n \"label\": \"Configuration\",\n \"links\": [\n { \"slug\": \"globals\", \"title\": \"Globals\" },\n { \"slug\": \"navigation\", \"title\": \"Navigation\" },\n { \"slug\": \"sections\", \"title\": \"Sections\" },\n { \"slug\": \"footer-links\", \"title\": \"Footer Links\" },\n { \"slug\": \"theme\", \"title\": \"Theme\" },\n { \"slug\": \"media-and-assets\", \"title\": \"Media and assets\" },\n { \"slug\": \"fonts\", \"title\": \"Fonts\" },\n { \"slug\": \"ai-assistant\", \"title\": \"AI Assistant\" },\n { \"slug\": \"model-context-protocol\", \"title\": \"Model Context Protocol\" },\n { \"slug\": \"analytics\", \"title\": \"Analytics\" },\n { \"slug\": \"deployment-and-hosting\", \"title\": \"Deployment & Hosting\" }\n ]\n }\n]\n```\n\n### Object format (per-section)\n\nWhen using [sections](/sections), you can define navigation for each section by using an object keyed by section slug. Sections without a key fall back to auto-generated navigation from frontmatter.\n\n```json\n{\n \"\": [\n {\n \"label\": \"General\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Getting Started\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n }\n ],\n \"platform\": [\n {\n \"label\": \"Overview\",\n \"links\": [\n { \"slug\": \"platform/auth\", \"title\": \"Authentication\" },\n { \"slug\": \"platform/users\", \"title\": \"Users\" }\n ]\n }\n ]\n}\n```\n\nThe key `\"\"` controls the root section. Other keys match section slugs defined in `sections.json` or derived from frontmatter. See [Sections](/sections) for details on configuring sections.\n\n### Fields\n\n- **label**: The section header shown in the sidebar.\n- **links**: An array of page entries for that section.\n - **slug**: The MDX file slug (filename without extension). Use an empty string `\"\"` for `index.mdx`.\n - **title**: The display title in the navigation. This can differ from the page's `title` frontmatter.\n\n## Precedence and behavior\n\n<Callout type=\"note\">\n `navigation.json` takes priority over frontmatter. If present, it fully controls the sidebar structure for the sections it covers.\n</Callout>\n\n- Without `navigation.json`, the sidebar is built from page frontmatter: `category` -> grouped; `categoryOrder` -> category position; `order` -> page position.\n- When using the object format, sections not listed in `navigation.json` fall back to frontmatter-based navigation.\n- Pages without a `category` appear at the top level.\n\n## Tips\n\n- **Start simple**: Use frontmatter for small docs. Switch to `navigation.json` as the structure grows.\n- **Keep slugs consistent**: `slug` must match the MDX filename (e.g., `text.mdx` -> `text`).\n- **Control titles**: Use `title` in `navigation.json` to customize sidebar labels without changing page frontmatter.\n- **Per-section navigation**: Use the object format to define different sidebars for each section. Mix and match - define some sections explicitly and let others auto-generate.";
|
|
1
|
+
export declare const navigationMdxTemplate = "---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 2\n---\n\n# Navigation\n\nDoccupine builds your sidebar automatically from your MDX pages. By default, it reads the page frontmatter and groups pages into categories in the order you define. For larger docs, you can take full control with a `navigation.json` file.\n\n## Automatic navigation (default)\n\nWhen no custom navigation is provided, Doccupine generates a structure based on each page's frontmatter.\n\n### Frontmatter fields\n\n- **category**: The category name that groups the page in the sidebar.\n- **categoryOrder**: The position of the category within the sidebar. Lower numbers appear first.\n- **order**: The position of the page within its category. Lower numbers appear first.\n- **navIcon**: Optional [Lucide](https://lucide.dev/icons) icon name shown next to the page's sidebar link.\n- **categoryIcon**: Optional Lucide icon name for the page's category header. The first page in a category that sets it wins.\n\n### Example frontmatter\n\n```text\n---\ntitle: \"Navigation\"\ndescription: \"Organize and structure your navigation.\"\ndate: \"2025-01-15\"\ncategory: \"Configuration\"\ncategoryOrder: 3\norder: 2\n---\n```\n\nThis approach is great for small sets of documents. For larger projects, setting these fields on every page can become repetitive.\n\n## Custom navigation with navigation.json\n\nTo centrally define the entire sidebar, create a `navigation.json` at your project root (the same folder where you execute `npx doccupine`). When present, it takes priority over page frontmatter and fully controls the navigation structure.\n\n### Array format\n\nThe simplest format is an array of categories. When using [sections](/sections), this applies to the root section only.\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n },\n {\n \"label\": \"Components\",\n \"links\": [\n { \"slug\": \"components\", \"title\": \"Components\" },\n { \"slug\": \"headers-and-text\", \"title\": \"Headers and Text\" },\n { \"slug\": \"lists-and-tables\", \"title\": \"Lists and tables\" },\n { \"slug\": \"code\", \"title\": \"Code\" },\n { \"slug\": \"accordion\", \"title\": \"Accordion\" },\n { \"slug\": \"tabs\", \"title\": \"Tabs\" },\n { \"slug\": \"cards\", \"title\": \"Cards\" },\n { \"slug\": \"buttons\", \"title\": \"Buttons\" },\n { \"slug\": \"callouts\", \"title\": \"Callouts\" },\n { \"slug\": \"image-and-embeds\", \"title\": \"Images and embeds\" },\n { \"slug\": \"icons\", \"title\": \"Icons\" },\n { \"slug\": \"fields\", \"title\": \"Fields\" },\n { \"slug\": \"update\", \"title\": \"Update\" },\n { \"slug\": \"columns\", \"title\": \"Columns\" },\n { \"slug\": \"steps\", \"title\": \"Steps\" },\n { \"slug\": \"color-swatches\", \"title\": \"Color Swatches\" }\n ]\n },\n {\n \"label\": \"Configuration\",\n \"links\": [\n { \"slug\": \"globals\", \"title\": \"Globals\" },\n { \"slug\": \"navigation\", \"title\": \"Navigation\" },\n { \"slug\": \"sections\", \"title\": \"Sections\" },\n { \"slug\": \"footer-links\", \"title\": \"Footer Links\" },\n { \"slug\": \"theme\", \"title\": \"Theme\" },\n { \"slug\": \"media-and-assets\", \"title\": \"Media and assets\" },\n { \"slug\": \"fonts\", \"title\": \"Fonts\" },\n { \"slug\": \"ai-assistant\", \"title\": \"AI Assistant\" },\n { \"slug\": \"model-context-protocol\", \"title\": \"Model Context Protocol\" },\n { \"slug\": \"analytics\", \"title\": \"Analytics\" },\n { \"slug\": \"deployment-and-hosting\", \"title\": \"Deployment & Hosting\" },\n { \"slug\": \"authentication\", \"title\": \"Authentication\" }\n ]\n }\n]\n```\n\n### Object format (per-section)\n\nWhen using [sections](/sections), you can define navigation for each section by using an object keyed by section slug. Sections without a key fall back to auto-generated navigation from frontmatter.\n\n```json\n{\n \"\": [\n {\n \"label\": \"General\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Getting Started\" },\n { \"slug\": \"commands\", \"title\": \"Commands\" }\n ]\n }\n ],\n \"platform\": [\n {\n \"label\": \"Overview\",\n \"links\": [\n { \"slug\": \"platform/auth\", \"title\": \"Authentication\" },\n { \"slug\": \"platform/users\", \"title\": \"Users\" }\n ]\n }\n ]\n}\n```\n\nThe key `\"\"` controls the root section. Other keys match section slugs defined in `sections.json` or derived from frontmatter. See [Sections](/sections) for details on configuring sections.\n\n### Fields\n\n- **label**: The section header shown in the sidebar.\n- **icon**: Optional [Lucide](https://lucide.dev/icons) icon name shown next to the category header.\n- **links**: An array of page entries for that section.\n - **slug**: The MDX file slug (filename without extension). Use an empty string `\"\"` for `index.mdx`.\n - **title**: The display title in the navigation. This can differ from the page's `title` frontmatter.\n - **icon**: Optional Lucide icon name shown next to the link.\n - **links**: Optional array of nested child links. See [Nested navigation](#nested-navigation).\n\n## Icons\n\nAdd icons to categories and links to make the sidebar easier to scan. Icons use [Lucide](https://lucide.dev/icons) names in kebab-case (e.g. `rocket`, `book-open`, `settings`). Unknown names render nothing, so a typo never breaks the build.\n\nWith frontmatter, set `navIcon` on a page for its sidebar link and `categoryIcon` for its category:\n\n```text\n---\ntitle: \"Introduction\"\ncategory: \"Getting Started\"\ncategoryOrder: 1\norder: 1\nnavIcon: \"rocket\"\ncategoryIcon: \"book-open\"\n---\n```\n\nWith `navigation.json`, add an `icon` to any category or link:\n\n```json\n[\n {\n \"label\": \"Getting Started\",\n \"icon\": \"book-open\",\n \"links\": [\n { \"slug\": \"\", \"title\": \"Introduction\", \"icon\": \"rocket\" },\n { \"slug\": \"commands\", \"title\": \"Commands\", \"icon\": \"terminal\" }\n ]\n }\n]\n```\n\n## Nested navigation\n\nA link in `navigation.json` can hold its own `links` array to create a collapsible group. Groups expand and collapse on click and open automatically when one of their pages is active. Nesting can go as deep as you need.\n\n```json\n[\n {\n \"label\": \"Guides\",\n \"icon\": \"book-open\",\n \"links\": [\n { \"slug\": \"guides\", \"title\": \"Overview\", \"icon\": \"compass\" },\n {\n \"title\": \"Advanced\",\n \"icon\": \"settings\",\n \"links\": [\n { \"slug\": \"guides/caching\", \"title\": \"Caching\" },\n { \"slug\": \"guides/streaming\", \"title\": \"Streaming\" }\n ]\n }\n ]\n }\n]\n```\n\nA group can be a plain label - omit `slug` and it acts only as a collapsible header - or a real page, by adding a `slug` so the group title is also a link.\n\n<Callout type=\"note\">\n Nested groups are only available through `navigation.json`. Frontmatter navigation is always two levels: category and pages.\n</Callout>\n\n## Precedence and behavior\n\n<Callout type=\"note\">\n `navigation.json` takes priority over frontmatter. If present, it fully controls the sidebar structure for the sections it covers.\n</Callout>\n\n- Without `navigation.json`, the sidebar is built from page frontmatter: `category` -> grouped; `categoryOrder` -> category position; `order` -> page position.\n- When using the object format, sections not listed in `navigation.json` fall back to frontmatter-based navigation.\n- Pages without a `category` appear at the top level.\n\n## Tips\n\n- **Start simple**: Use frontmatter for small docs. Switch to `navigation.json` as the structure grows.\n- **Keep slugs consistent**: `slug` must match the MDX filename (e.g., `text.mdx` -> `text`).\n- **Control titles**: Use `title` in `navigation.json` to customize sidebar labels without changing page frontmatter.\n- **Per-section navigation**: Use the object format to define different sidebars for each section. Mix and match - define some sections explicitly and let others auto-generate.";
|
|
@@ -20,6 +20,8 @@ When no custom navigation is provided, Doccupine generates a structure based on
|
|
|
20
20
|
- **category**: The category name that groups the page in the sidebar.
|
|
21
21
|
- **categoryOrder**: The position of the category within the sidebar. Lower numbers appear first.
|
|
22
22
|
- **order**: The position of the page within its category. Lower numbers appear first.
|
|
23
|
+
- **navIcon**: Optional [Lucide](https://lucide.dev/icons) icon name shown next to the page's sidebar link.
|
|
24
|
+
- **categoryIcon**: Optional Lucide icon name for the page's category header. The first page in a category that sets it wins.
|
|
23
25
|
|
|
24
26
|
### Example frontmatter
|
|
25
27
|
|
|
@@ -87,7 +89,8 @@ The simplest format is an array of categories. When using [sections](/sections),
|
|
|
87
89
|
{ "slug": "ai-assistant", "title": "AI Assistant" },
|
|
88
90
|
{ "slug": "model-context-protocol", "title": "Model Context Protocol" },
|
|
89
91
|
{ "slug": "analytics", "title": "Analytics" },
|
|
90
|
-
{ "slug": "deployment-and-hosting", "title": "Deployment & Hosting" }
|
|
92
|
+
{ "slug": "deployment-and-hosting", "title": "Deployment & Hosting" },
|
|
93
|
+
{ "slug": "authentication", "title": "Authentication" }
|
|
91
94
|
]
|
|
92
95
|
}
|
|
93
96
|
]
|
|
@@ -125,9 +128,74 @@ The key \`""\` controls the root section. Other keys match section slugs defined
|
|
|
125
128
|
### Fields
|
|
126
129
|
|
|
127
130
|
- **label**: The section header shown in the sidebar.
|
|
131
|
+
- **icon**: Optional [Lucide](https://lucide.dev/icons) icon name shown next to the category header.
|
|
128
132
|
- **links**: An array of page entries for that section.
|
|
129
133
|
- **slug**: The MDX file slug (filename without extension). Use an empty string \`""\` for \`index.mdx\`.
|
|
130
134
|
- **title**: The display title in the navigation. This can differ from the page's \`title\` frontmatter.
|
|
135
|
+
- **icon**: Optional Lucide icon name shown next to the link.
|
|
136
|
+
- **links**: Optional array of nested child links. See [Nested navigation](#nested-navigation).
|
|
137
|
+
|
|
138
|
+
## Icons
|
|
139
|
+
|
|
140
|
+
Add icons to categories and links to make the sidebar easier to scan. Icons use [Lucide](https://lucide.dev/icons) names in kebab-case (e.g. \`rocket\`, \`book-open\`, \`settings\`). Unknown names render nothing, so a typo never breaks the build.
|
|
141
|
+
|
|
142
|
+
With frontmatter, set \`navIcon\` on a page for its sidebar link and \`categoryIcon\` for its category:
|
|
143
|
+
|
|
144
|
+
\`\`\`text
|
|
145
|
+
---
|
|
146
|
+
title: "Introduction"
|
|
147
|
+
category: "Getting Started"
|
|
148
|
+
categoryOrder: 1
|
|
149
|
+
order: 1
|
|
150
|
+
navIcon: "rocket"
|
|
151
|
+
categoryIcon: "book-open"
|
|
152
|
+
---
|
|
153
|
+
\`\`\`
|
|
154
|
+
|
|
155
|
+
With \`navigation.json\`, add an \`icon\` to any category or link:
|
|
156
|
+
|
|
157
|
+
\`\`\`json
|
|
158
|
+
[
|
|
159
|
+
{
|
|
160
|
+
"label": "Getting Started",
|
|
161
|
+
"icon": "book-open",
|
|
162
|
+
"links": [
|
|
163
|
+
{ "slug": "", "title": "Introduction", "icon": "rocket" },
|
|
164
|
+
{ "slug": "commands", "title": "Commands", "icon": "terminal" }
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
\`\`\`
|
|
169
|
+
|
|
170
|
+
## Nested navigation
|
|
171
|
+
|
|
172
|
+
A link in \`navigation.json\` can hold its own \`links\` array to create a collapsible group. Groups expand and collapse on click and open automatically when one of their pages is active. Nesting can go as deep as you need.
|
|
173
|
+
|
|
174
|
+
\`\`\`json
|
|
175
|
+
[
|
|
176
|
+
{
|
|
177
|
+
"label": "Guides",
|
|
178
|
+
"icon": "book-open",
|
|
179
|
+
"links": [
|
|
180
|
+
{ "slug": "guides", "title": "Overview", "icon": "compass" },
|
|
181
|
+
{
|
|
182
|
+
"title": "Advanced",
|
|
183
|
+
"icon": "settings",
|
|
184
|
+
"links": [
|
|
185
|
+
{ "slug": "guides/caching", "title": "Caching" },
|
|
186
|
+
{ "slug": "guides/streaming", "title": "Streaming" }
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
\`\`\`
|
|
193
|
+
|
|
194
|
+
A group can be a plain label - omit \`slug\` and it acts only as a collapsible header - or a real page, by adding a \`slug\` so the group title is also a link.
|
|
195
|
+
|
|
196
|
+
<Callout type="note">
|
|
197
|
+
Nested groups are only available through \`navigation.json\`. Frontmatter navigation is always two levels: category and pages.
|
|
198
|
+
</Callout>
|
|
131
199
|
|
|
132
200
|
## Precedence and behavior
|
|
133
201
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const platformBuildAndDeployMdxTemplate = "---\ntitle: \"Build & Deploy\"\ndescription: \"Monitor your documentation site's build status and deployment history.\"\ndate: \"2026-02-19\"\ncategory: \"Infrastructure\"\ncategoryOrder: 3\norder: 1\nsection: \"Platform\"\n---\n\n# Build & Deploy\n\nThe Build & Deploy page shows your documentation site's build and deployment history. Every time you publish changes or push to GitHub, a new deployment is created.\n\n## Deployment status\n\nThe project header always shows your current deployment status:\n\n- **Ready** - your site is live and up to date\n- **Building** - a new deployment is in progress\n- **Queued** - a deployment is waiting to start\n- **Error** - the build failed\n\n<Callout type=\"warning\">\n If a deployment fails, check the build logs for error details. Common issues include MDX syntax errors or missing frontmatter fields.\n</Callout>\n\n## Build logs\n\nClick on any deployment to view its build logs. These show the full output of the build process, making it easy to diagnose issues.\n\n## Deployment triggers\n\nDeployments are triggered in three ways:\n\n1. **Publishing from Doccupine** - clicking Publish in the project header\n2. **Pushing to GitHub** - pushing to the `main` branch of your repository triggers an automatic deploy via webhook\n3. **Configuration changes** - saving AI assistant settings triggers a redeploy since those are stored as environment variables\n\n## Visiting your site\n\nClick the **Visit** button in the project header to open your live documentation site in a new tab.";
|
|
1
|
+
export declare const platformBuildAndDeployMdxTemplate = "---\ntitle: \"Build & Deploy\"\ndescription: \"Monitor your documentation site's build status and deployment history.\"\ndate: \"2026-02-19\"\ncategory: \"Infrastructure\"\ncategoryOrder: 3\ncategoryIcon: \"server\"\norder: 1\nsection: \"Platform\"\n---\n\n# Build & Deploy\n\nThe Build & Deploy page shows your documentation site's build and deployment history. Every time you publish changes or push to GitHub, a new deployment is created.\n\n## Deployment status\n\nThe project header always shows your current deployment status:\n\n- **Ready** - your site is live and up to date\n- **Building** - a new deployment is in progress\n- **Queued** - a deployment is waiting to start\n- **Error** - the build failed\n\n<Callout type=\"warning\">\n If a deployment fails, check the build logs for error details. Common issues include MDX syntax errors or missing frontmatter fields.\n</Callout>\n\n## Build logs\n\nClick on any deployment to view its build logs. These show the full output of the build process, making it easy to diagnose issues.\n\n## Deployment triggers\n\nDeployments are triggered in three ways:\n\n1. **Publishing from Doccupine** - clicking Publish in the project header\n2. **Pushing to GitHub** - pushing to the `main` branch of your repository triggers an automatic deploy via webhook\n3. **Configuration changes** - saving AI assistant settings triggers a redeploy since those are stored as environment variables\n\n## Visiting your site\n\nClick the **Visit** button in the project header to open your live documentation site in a new tab.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const platformFileEditorMdxTemplate = "---\ntitle: \"File Editor\"\ndescription: \"Browse, create, and edit your documentation files directly in the browser.\"\ndate: \"2026-02-19\"\ncategory: \"Editing\"\ncategoryOrder: 1\norder: 0\nsection: \"Platform\"\n---\n\n# File Editor\n\nThe file editor is the main workspace for your documentation project. It provides a browser-based file explorer and editor for working with your MDX files and assets.\n\n## File explorer\n\nThe left panel has three tabs:\n\n- **Files** - browse your repository's file tree, create and manage files and folders\n- **Media** - manage uploaded images and binary assets\n- **Navigation** - open the [Navigation Builder](/platform/navigation-settings) to configure your sidebar structure with drag-and-drop\n\nIn the Files tab, you can:\n\n- **Browse** directories and files\n- **Create** new files and folders\n- **Rename** and **delete** existing files\n- **Upload** binary assets like images, favicons, and font files\n\nClick any file to open it in the editor panel.\n\n## Editing files\n\nThe editor supports MDX files with full syntax highlighting. Changes you make are saved as **pending changes** - they aren't committed to your repository until you publish.\n\n<Callout type=\"note\">\n Pending changes are stored in Doccupine's database, not in your Git repository. This means you can make edits across multiple sessions before publishing.\n</Callout>\n\n## Version history\n\nFor any file, you can view its commit history to see how it has changed over time. This lets you:\n\n- See when changes were made and what the commit messages were\n- View the file's content at any previous commit\n- Compare past versions to understand what changed\n\n## Binary files\n\nYou can upload images and other binary assets (PNG, JPG, SVG, WOFF2, etc.) directly through the file explorer. These are stored temporarily in Doccupine's storage and committed to your repository when you publish.\n\n## Read-only mode\n\nTeam members with the **Viewer** or **Billing** role can browse files but cannot make edits. The editor will display content in read-only mode for these users.";
|
|
1
|
+
export declare const platformFileEditorMdxTemplate = "---\ntitle: \"File Editor\"\ndescription: \"Browse, create, and edit your documentation files directly in the browser.\"\ndate: \"2026-02-19\"\ncategory: \"Editing\"\ncategoryOrder: 1\ncategoryIcon: \"pencil\"\norder: 0\nsection: \"Platform\"\n---\n\n# File Editor\n\nThe file editor is the main workspace for your documentation project. It provides a browser-based file explorer and editor for working with your MDX files and assets.\n\n## File explorer\n\nThe left panel has three tabs:\n\n- **Files** - browse your repository's file tree, create and manage files and folders\n- **Media** - manage uploaded images and binary assets\n- **Navigation** - open the [Navigation Builder](/platform/navigation-settings) to configure your sidebar structure with drag-and-drop\n\nIn the Files tab, you can:\n\n- **Browse** directories and files\n- **Create** new files and folders\n- **Rename** and **delete** existing files\n- **Upload** binary assets like images, favicons, and font files\n\nClick any file to open it in the editor panel.\n\n## Editing files\n\nThe editor supports MDX files with full syntax highlighting. Changes you make are saved as **pending changes** - they aren't committed to your repository until you publish.\n\n<Callout type=\"note\">\n Pending changes are stored in Doccupine's database, not in your Git repository. This means you can make edits across multiple sessions before publishing.\n</Callout>\n\n## Version history\n\nFor any file, you can view its commit history to see how it has changed over time. This lets you:\n\n- See when changes were made and what the commit messages were\n- View the file's content at any previous commit\n- Compare past versions to understand what changed\n\n## Binary files\n\nYou can upload images and other binary assets (PNG, JPG, SVG, WOFF2, etc.) directly through the file explorer. These are stored temporarily in Doccupine's storage and committed to your repository when you publish.\n\n## Read-only mode\n\nTeam members with the **Viewer** or **Billing** role can browse files but cannot make edits. The editor will display content in read-only mode for these users.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const platformIndexMdxTemplate = "---\ntitle: \"Platform Overview\"\ndescription: \"Learn how to use the Doccupine platform to create, customize, and deploy documentation websites.\"\ndate: \"2026-02-19\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\norder: 0\nsection: \"Platform\"\n---\n\n# Platform Overview\n\nThe Doccupine platform gives you everything you need to create, customize, and host beautiful documentation websites - all from your browser. No local setup, no CI pipelines, no infrastructure to manage.\n\n## What you get\n\n- **Browser-based editor** for writing and managing your documentation files\n- **One-click publishing** that commits to GitHub and deploys automatically\n- **Visual configuration** for themes, navigation, fonts, links, and more\n- **Custom domains** with automatic HTTPS\n- **AI assistant** built into every deployed site\n- **Team collaboration** with role-based access control\n\n## How it works\n\nDoccupine connects two core pieces behind the scenes:\n\n1. **GitHub** stores your documentation source files in a Git repository\n2. **Doccupine** builds, hosts, and serves your site globally - plus provides a dashboard for editing, configuring, and managing your project\n\nYou write MDX files, configure your site through visual settings pages, and hit Publish. Doccupine handles the rest.\n\n## Getting started\n\n1. **Sign up** at Doccupine and start your free 30-day trial - no credit card required.\n2. **Create a project** from the dashboard. Choose between a managed repository or connecting your own GitHub account.\n3. **Edit your docs** using the built-in file explorer and editor.\n4. **Configure your site** through the settings pages - theme, navigation, fonts, and more.\n5. **Publish** your changes with a single click.\n\n<Callout type=\"success\">\n Your documentation site is live the moment you create a project. Doccupine deploys a starter site automatically so you can see results immediately.\n</Callout>\n\n## Dashboard\n\nAfter signing in, the dashboard shows all your projects. You'll see two sections:\n\n- **Your Projects** - documentation sites you own, plus a button to create new ones\n- **Shared Projects** - sites that other users have invited you to collaborate on\n\nClick any project card to open it and start working.\n\n<Columns cols={2}>\n <Card title=\"Sign Up\" icon=\"user-plus\" href=\"https://doccupine.com/sign-up\">\n Create your free account and start building documentation in minutes.\n </Card>\n <Card title=\"Sign In\" icon=\"log-in\" href=\"https://doccupine.com/sign-in\">\n Already have an account? Sign in to your dashboard.\n </Card>\n</Columns>";
|
|
1
|
+
export declare const platformIndexMdxTemplate = "---\ntitle: \"Platform Overview\"\ndescription: \"Learn how to use the Doccupine platform to create, customize, and deploy documentation websites.\"\ndate: \"2026-02-19\"\ncategory: \"Getting Started\"\ncategoryOrder: 0\ncategoryIcon: \"rocket\"\norder: 0\nsection: \"Platform\"\n---\n\n# Platform Overview\n\nThe Doccupine platform gives you everything you need to create, customize, and host beautiful documentation websites - all from your browser. No local setup, no CI pipelines, no infrastructure to manage.\n\n## What you get\n\n- **Browser-based editor** for writing and managing your documentation files\n- **One-click publishing** that commits to GitHub and deploys automatically\n- **Visual configuration** for themes, navigation, fonts, links, and more\n- **Custom domains** with automatic HTTPS\n- **AI assistant** built into every deployed site\n- **Team collaboration** with role-based access control\n\n## How it works\n\nDoccupine connects two core pieces behind the scenes:\n\n1. **GitHub** stores your documentation source files in a Git repository\n2. **Doccupine** builds, hosts, and serves your site globally - plus provides a dashboard for editing, configuring, and managing your project\n\nYou write MDX files, configure your site through visual settings pages, and hit Publish. Doccupine handles the rest.\n\n## Getting started\n\n1. **Sign up** at Doccupine and start your free 30-day trial - no credit card required.\n2. **Create a project** from the dashboard. Choose between a managed repository or connecting your own GitHub account.\n3. **Edit your docs** using the built-in file explorer and editor.\n4. **Configure your site** through the settings pages - theme, navigation, fonts, and more.\n5. **Publish** your changes with a single click.\n\n<Callout type=\"success\">\n Your documentation site is live the moment you create a project. Doccupine deploys a starter site automatically so you can see results immediately.\n</Callout>\n\n## Dashboard\n\nAfter signing in, the dashboard shows all your projects. You'll see two sections:\n\n- **Your Projects** - documentation sites you own, plus a button to create new ones\n- **Shared Projects** - sites that other users have invited you to collaborate on\n\nClick any project card to open it and start working.\n\n<Columns cols={2}>\n <Card title=\"Sign Up\" icon=\"user-plus\" href=\"https://doccupine.com/sign-up\">\n Create your free account and start building documentation in minutes.\n </Card>\n <Card title=\"Sign In\" icon=\"log-in\" href=\"https://doccupine.com/sign-in\">\n Already have an account? Sign in to your dashboard.\n </Card>\n</Columns>";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const platformProjectSettingsMdxTemplate = "---\ntitle: \"Project Settings\"\ndescription: \"Rename or delete your documentation project.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 4\norder: 2\nsection: \"Platform\"\n---\n\n# Project Settings\n\nThe Project settings page provides basic project management options including renaming and deletion.\n\n## Renaming a project\n\nEnter a new name for your project and click **Save**. The project name is used in the dashboard and sidebar - it does not affect your site's URL or domain.\n\n## Deleting a project\n\n<Callout type=\"warning\">\n Deleting a project is permanent and cannot be undone.\n</Callout>\n\nTo delete a project:\n\n1. Navigate to the **Project** settings page.\n2. In the **Danger Zone** section, click **Delete Project**.\n3. Type your project's name to confirm.\n4. Click **Delete**.\n\nDeletion removes:\n\n- The GitHub repository (if managed by Doccupine)\n- The hosted deployment\n- All pending changes\n- All team member associations\n- The project record\n\nIf you're using a user-connected GitHub repository, the repo in your GitHub account is preserved - only the Doccupine project and its deployment are removed.";
|
|
1
|
+
export declare const platformProjectSettingsMdxTemplate = "---\ntitle: \"Project Settings\"\ndescription: \"Rename or delete your documentation project.\"\ndate: \"2026-02-19\"\ncategory: \"Account\"\ncategoryOrder: 4\ncategoryIcon: \"user\"\norder: 2\nsection: \"Platform\"\n---\n\n# Project Settings\n\nThe Project settings page provides basic project management options including renaming and deletion.\n\n## Renaming a project\n\nEnter a new name for your project and click **Save**. The project name is used in the dashboard and sidebar - it does not affect your site's URL or domain.\n\n## Deleting a project\n\n<Callout type=\"warning\">\n Deleting a project is permanent and cannot be undone.\n</Callout>\n\nTo delete a project:\n\n1. Navigate to the **Project** settings page.\n2. In the **Danger Zone** section, click **Delete Project**.\n3. Type your project's name to confirm.\n4. Click **Delete**.\n\nDeletion removes:\n\n- The GitHub repository (if managed by Doccupine)\n- The hosted deployment\n- All pending changes\n- All team member associations\n- The project record\n\nIf you're using a user-connected GitHub repository, the repo in your GitHub account is preserved - only the Doccupine project and its deployment are removed.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const platformSiteSettingsMdxTemplate = "---\ntitle: \"Site Settings\"\ndescription: \"Configure your documentation site's name, description, icon, and image.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 0\nsection: \"Platform\"\n---\n\n# Site Settings\n\nThe Site settings page lets you configure the core metadata for your documentation site. These values are stored in `config.json` at the root of your repository.\n\n## Fields\n\n### Name\n\nThe name of your documentation site. This appears in the site header and browser tab title.\n\n### Description\n\nA short description of your documentation. Used in meta tags for search engine optimization and social media previews.\n\n### Favicon\n\nUpload a favicon image that appears in browser tabs. Supported formats include PNG, ICO, and SVG. Use the file upload button to select an image from your computer.\n\n### Preview image\n\nUpload an image used for social media and OpenGraph previews. This is the image that appears when your documentation URL is shared on platforms like Twitter, Slack, or Discord.\n\n### Site URL\n\nThe public URL of your deployed documentation site, such as `https://docs.example.com`. This value is used as the base URL when generating `sitemap.xml` and `robots.txt`, so search engines can discover and index your pages correctly. You can override this at deploy time by setting the `NEXT_PUBLIC_SITE_URL` environment variable.\n\n<Callout type=\"note\">\n Changes to site settings are staged as pending changes, just like file edits. Click **Publish** to commit them to your repository and trigger a deploy.\n</Callout>\n\n## How it works\n\nBehind the scenes, the Site settings page reads and writes `config.json` in your repository. You can also edit this file directly in the file editor if you prefer. See the [Globals](/globals) page for the full configuration reference.\n\n```json\n{\n \"name\": \"My Documentation\",\n \"description\": \"Documentation for my project\",\n \"icon\": \"/favicon.png\",\n \"image\": \"/preview.png\",\n \"url\": \"https://docs.example.com\"\n}\n```";
|
|
1
|
+
export declare const platformSiteSettingsMdxTemplate = "---\ntitle: \"Site Settings\"\ndescription: \"Configure your documentation site's name, description, icon, and image.\"\ndate: \"2026-02-19\"\ncategory: \"Configuration\"\ncategoryOrder: 2\ncategoryIcon: \"settings\"\norder: 0\nsection: \"Platform\"\n---\n\n# Site Settings\n\nThe Site settings page lets you configure the core metadata for your documentation site. These values are stored in `config.json` at the root of your repository.\n\n## Fields\n\n### Name\n\nThe name of your documentation site. This appears in the site header and browser tab title.\n\n### Description\n\nA short description of your documentation. Used in meta tags for search engine optimization and social media previews.\n\n### Favicon\n\nUpload a favicon image that appears in browser tabs. Supported formats include PNG, ICO, and SVG. Use the file upload button to select an image from your computer.\n\n### Preview image\n\nUpload an image used for social media and OpenGraph previews. This is the image that appears when your documentation URL is shared on platforms like Twitter, Slack, or Discord.\n\n### Site URL\n\nThe public URL of your deployed documentation site, such as `https://docs.example.com`. This value is used as the base URL when generating `sitemap.xml` and `robots.txt`, so search engines can discover and index your pages correctly. You can override this at deploy time by setting the `NEXT_PUBLIC_SITE_URL` environment variable.\n\n<Callout type=\"note\">\n Changes to site settings are staged as pending changes, just like file edits. Click **Publish** to commit them to your repository and trigger a deploy.\n</Callout>\n\n## How it works\n\nBehind the scenes, the Site settings page reads and writes `config.json` in your repository. You can also edit this file directly in the file editor if you prefer. See the [Globals](/globals) page for the full configuration reference.\n\n```json\n{\n \"name\": \"My Documentation\",\n \"description\": \"Documentation for my project\",\n \"icon\": \"/favicon.png\",\n \"image\": \"/preview.png\",\n \"url\": \"https://docs.example.com\"\n}\n```";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const tabsMdxTemplate = "---\ntitle: \"Tabs\"\ndescription: \"Use the Tabs component to display different content sections in a switchable panel layout.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 5\n---\n\n# Tabs\n\nUse the Tabs component to display different content sections in a switchable panel layout.\n\nTabs are useful for grouping related information while keeping the interface tidy. You can create as many tabs as needed, and each one can hold other components, text, or code snippets.\n\n## Tabs Usage\n\nYou can use the Tabs component directly within your MDX files without any import. The following example shows a basic usage:\n\n````mdx\n<Tabs>\n <TabContent title=\"First tab\">\n \u261D\uFE0F This is the content shown only when the first tab is active.\n\n Tabs can include all kinds of components. For example, a simple Java program:\n ```java\n class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n }\n ```\n\n </TabContent>\n <TabContent title=\"Second tab\">\n \u270C\uFE0F Content inside this second tab is separate from the first.\n </TabContent>\n <TabContent title=\"Third tab\">\n \uD83D\uDCAA This third tab contains its own unique content.\n </TabContent>\n</Tabs>\n````\n\n<Tabs>\n <TabContent title=\"First tab\">\n \u261D\uFE0F This is the content shown only when the first tab is active.\n\n Tabs can include all kinds of components. For example, a simple Java program:\n ```java\n class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n }\n ```\n\n </TabContent>\n <TabContent title=\"Second tab\">\n \u270C\uFE0F Content inside this second tab is separate from the first.\n </TabContent>\n <TabContent title=\"Third tab\">\n \uD83D\uDCAA This third tab contains its own unique content.\n </TabContent>\n</Tabs>\n\n## Properties\n\n<Field value=\"title\" type=\"string\">\n The title of the tab.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the tabs.\n</Field>";
|
|
1
|
+
export declare const tabsMdxTemplate = "---\ntitle: \"Tabs\"\ndescription: \"Use the Tabs component to display different content sections in a switchable panel layout.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 5\n---\n\n# Tabs\n\nUse the Tabs component to display different content sections in a switchable panel layout.\n\nTabs are useful for grouping related information while keeping the interface tidy. You can create as many tabs as needed, and each one can hold other components, text, or code snippets.\n\n## Tabs Usage\n\nYou can use the Tabs component directly within your MDX files without any import. The following example shows a basic usage:\n\n````mdx\n<Tabs>\n <TabContent title=\"First tab\" icon=\"code\">\n \u261D\uFE0F This is the content shown only when the first tab is active.\n\n Tabs can include all kinds of components. For example, a simple Java program:\n ```java\n class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n }\n ```\n\n </TabContent>\n <TabContent title=\"Second tab\" icon=\"book-open\">\n \u270C\uFE0F Content inside this second tab is separate from the first.\n </TabContent>\n <TabContent title=\"Third tab\" icon=\"rocket\">\n \uD83D\uDCAA This third tab contains its own unique content.\n </TabContent>\n</Tabs>\n````\n\n<Tabs>\n <TabContent title=\"First tab\" icon=\"code\">\n \u261D\uFE0F This is the content shown only when the first tab is active.\n\n Tabs can include all kinds of components. For example, a simple Java program:\n ```java\n class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n }\n ```\n\n </TabContent>\n <TabContent title=\"Second tab\" icon=\"book-open\">\n \u270C\uFE0F Content inside this second tab is separate from the first.\n </TabContent>\n <TabContent title=\"Third tab\" icon=\"rocket\">\n \uD83D\uDCAA This third tab contains its own unique content.\n </TabContent>\n</Tabs>\n\nEach tab also accepts an optional `icon` - any [Lucide](https://lucide.dev/icons) icon name - rendered before its title, as shown above.\n\n## Properties\n\n<Field value=\"title\" type=\"string\">\n The title of the tab.\n</Field>\n\n<Field value=\"icon\" type=\"string\">\n Optional [Lucide](https://lucide.dev/icons) icon name (kebab-case, e.g.\n `rocket`) shown next to the tab title.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the tabs.\n</Field>";
|
|
@@ -19,7 +19,7 @@ You can use the Tabs component directly within your MDX files without any import
|
|
|
19
19
|
|
|
20
20
|
\`\`\`\`mdx
|
|
21
21
|
<Tabs>
|
|
22
|
-
<TabContent title="First tab">
|
|
22
|
+
<TabContent title="First tab" icon="code">
|
|
23
23
|
☝️ This is the content shown only when the first tab is active.
|
|
24
24
|
|
|
25
25
|
Tabs can include all kinds of components. For example, a simple Java program:
|
|
@@ -32,17 +32,17 @@ You can use the Tabs component directly within your MDX files without any import
|
|
|
32
32
|
\`\`\`
|
|
33
33
|
|
|
34
34
|
</TabContent>
|
|
35
|
-
<TabContent title="Second tab">
|
|
35
|
+
<TabContent title="Second tab" icon="book-open">
|
|
36
36
|
✌️ Content inside this second tab is separate from the first.
|
|
37
37
|
</TabContent>
|
|
38
|
-
<TabContent title="Third tab">
|
|
38
|
+
<TabContent title="Third tab" icon="rocket">
|
|
39
39
|
💪 This third tab contains its own unique content.
|
|
40
40
|
</TabContent>
|
|
41
41
|
</Tabs>
|
|
42
42
|
\`\`\`\`
|
|
43
43
|
|
|
44
44
|
<Tabs>
|
|
45
|
-
<TabContent title="First tab">
|
|
45
|
+
<TabContent title="First tab" icon="code">
|
|
46
46
|
☝️ This is the content shown only when the first tab is active.
|
|
47
47
|
|
|
48
48
|
Tabs can include all kinds of components. For example, a simple Java program:
|
|
@@ -55,20 +55,27 @@ You can use the Tabs component directly within your MDX files without any import
|
|
|
55
55
|
\`\`\`
|
|
56
56
|
|
|
57
57
|
</TabContent>
|
|
58
|
-
<TabContent title="Second tab">
|
|
58
|
+
<TabContent title="Second tab" icon="book-open">
|
|
59
59
|
✌️ Content inside this second tab is separate from the first.
|
|
60
60
|
</TabContent>
|
|
61
|
-
<TabContent title="Third tab">
|
|
61
|
+
<TabContent title="Third tab" icon="rocket">
|
|
62
62
|
💪 This third tab contains its own unique content.
|
|
63
63
|
</TabContent>
|
|
64
64
|
</Tabs>
|
|
65
65
|
|
|
66
|
+
Each tab also accepts an optional \`icon\` - any [Lucide](https://lucide.dev/icons) icon name - rendered before its title, as shown above.
|
|
67
|
+
|
|
66
68
|
## Properties
|
|
67
69
|
|
|
68
70
|
<Field value="title" type="string">
|
|
69
71
|
The title of the tab.
|
|
70
72
|
</Field>
|
|
71
73
|
|
|
74
|
+
<Field value="icon" type="string">
|
|
75
|
+
Optional [Lucide](https://lucide.dev/icons) icon name (kebab-case, e.g.
|
|
76
|
+
\`rocket\`) shown next to the tab title.
|
|
77
|
+
</Field>
|
|
78
|
+
|
|
72
79
|
<Field value="children" type="node" required>
|
|
73
80
|
The content of the tabs.
|
|
74
81
|
</Field>`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const orderNavItemsTemplate = "export interface PagesProps {\n slug: string;\n title: string;\n date: string | null;\n category: string;\n description?: string;\n path?: string;\n categoryOrder?: number;\n order?: number;\n section?: string;\n}\n\ninterface AccProps {\n [key: string]: {\n categoryOrder: number;\n pages: {\n date: string | null;\n slug: string;\n title: string;\n order: number;\n }[];\n };\n}\n\nfunction transformPagesToGroupedStructure(pages: PagesProps[]) {\n const grouped = pages.reduce((acc: AccProps, page: PagesProps) => {\n const category = page.category || \"Uncategorized\";\n\n if (!acc[category]) {\n acc[category] = {\n categoryOrder: page.categoryOrder || 0,\n pages: [],\n };\n }\n\n acc[category].pages.push({\n date: page.date,\n slug: page.slug,\n title: page.title,\n order: page.order || 0,\n });\n\n return acc;\n }, {});\n\n return Object.entries(grouped)\n .sort(([, a], [, b]) => a.categoryOrder - b.categoryOrder)\n .map(([categoryName, categoryData], index) => ({\n slug: index === 0 ? \"\" : categoryName.toLowerCase().replace(/s+/g, \"-\"),\n label: categoryName,\n links: categoryData.pages.sort((a, b) => a.order - b.order),\n }));\n}\n\nexport { transformPagesToGroupedStructure };\n";
|
|
1
|
+
export declare const orderNavItemsTemplate = "export interface PagesProps {\n slug: string;\n title: string;\n date: string | null;\n category: string;\n description?: string;\n path?: string;\n categoryOrder?: number;\n order?: number;\n section?: string;\n navIcon?: string;\n categoryIcon?: string;\n}\n\ninterface AccProps {\n [key: string]: {\n categoryOrder: number;\n icon?: string;\n pages: {\n date: string | null;\n slug: string;\n title: string;\n order: number;\n icon?: string;\n }[];\n };\n}\n\nfunction transformPagesToGroupedStructure(pages: PagesProps[]) {\n const grouped = pages.reduce((acc: AccProps, page: PagesProps) => {\n const category = page.category || \"Uncategorized\";\n\n if (!acc[category]) {\n acc[category] = {\n categoryOrder: page.categoryOrder || 0,\n pages: [],\n };\n }\n\n // The first page in a category to declare a categoryIcon sets it.\n if (!acc[category].icon && page.categoryIcon) {\n acc[category].icon = page.categoryIcon;\n }\n\n acc[category].pages.push({\n date: page.date,\n slug: page.slug,\n title: page.title,\n order: page.order || 0,\n icon: page.navIcon,\n });\n\n return acc;\n }, {});\n\n return Object.entries(grouped)\n .sort(([, a], [, b]) => a.categoryOrder - b.categoryOrder)\n .map(([categoryName, categoryData], index) => ({\n slug: index === 0 ? \"\" : categoryName.toLowerCase().replace(/s+/g, \"-\"),\n label: categoryName,\n icon: categoryData.icon,\n links: categoryData.pages.sort((a, b) => a.order - b.order),\n }));\n}\n\nexport { transformPagesToGroupedStructure };\n";
|
|
@@ -8,16 +8,20 @@ export const orderNavItemsTemplate = `export interface PagesProps {
|
|
|
8
8
|
categoryOrder?: number;
|
|
9
9
|
order?: number;
|
|
10
10
|
section?: string;
|
|
11
|
+
navIcon?: string;
|
|
12
|
+
categoryIcon?: string;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
interface AccProps {
|
|
14
16
|
[key: string]: {
|
|
15
17
|
categoryOrder: number;
|
|
18
|
+
icon?: string;
|
|
16
19
|
pages: {
|
|
17
20
|
date: string | null;
|
|
18
21
|
slug: string;
|
|
19
22
|
title: string;
|
|
20
23
|
order: number;
|
|
24
|
+
icon?: string;
|
|
21
25
|
}[];
|
|
22
26
|
};
|
|
23
27
|
}
|
|
@@ -33,11 +37,17 @@ function transformPagesToGroupedStructure(pages: PagesProps[]) {
|
|
|
33
37
|
};
|
|
34
38
|
}
|
|
35
39
|
|
|
40
|
+
// The first page in a category to declare a categoryIcon sets it.
|
|
41
|
+
if (!acc[category].icon && page.categoryIcon) {
|
|
42
|
+
acc[category].icon = page.categoryIcon;
|
|
43
|
+
}
|
|
44
|
+
|
|
36
45
|
acc[category].pages.push({
|
|
37
46
|
date: page.date,
|
|
38
47
|
slug: page.slug,
|
|
39
48
|
title: page.title,
|
|
40
49
|
order: page.order || 0,
|
|
50
|
+
icon: page.navIcon,
|
|
41
51
|
});
|
|
42
52
|
|
|
43
53
|
return acc;
|
|
@@ -48,6 +58,7 @@ function transformPagesToGroupedStructure(pages: PagesProps[]) {
|
|
|
48
58
|
.map(([categoryName, categoryData], index) => ({
|
|
49
59
|
slug: index === 0 ? "" : categoryName.toLowerCase().replace(/s+/g, "-"),
|
|
50
60
|
label: categoryName,
|
|
61
|
+
icon: categoryData.icon,
|
|
51
62
|
links: categoryData.pages.sort((a, b) => a.order - b.order),
|
|
52
63
|
}));
|
|
53
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doccupine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.104",
|
|
4
4
|
"description": "Free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|