@docubook/create 1.15.1 → 1.15.2

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 (40) hide show
  1. package/package.json +2 -3
  2. package/src/dist/app/page.tsx +1 -1
  3. package/src/dist/contents/docs/api-reference/delete/index.mdx +63 -0
  4. package/src/dist/contents/docs/api-reference/fetch/index.mdx +63 -0
  5. package/src/dist/contents/docs/api-reference/get/index.mdx +63 -0
  6. package/src/dist/contents/docs/api-reference/post/index.mdx +63 -0
  7. package/src/dist/contents/docs/changelog/version-1/index.mdx +22 -660
  8. package/src/dist/contents/docs/changelog/version-2/index.mdx +49 -0
  9. package/src/dist/contents/docs/changelog/version-3/index.mdx +49 -0
  10. package/src/dist/contents/docs/getting-started/development/index.mdx +63 -0
  11. package/src/dist/contents/docs/getting-started/introduction/index.mdx +49 -36
  12. package/src/dist/contents/docs/getting-started/quick-start-guide/index.mdx +44 -126
  13. package/src/dist/docu.json +90 -104
  14. package/src/dist/package.json +1 -1
  15. package/src/dist/contents/docs/components/accordion/index.mdx +0 -86
  16. package/src/dist/contents/docs/components/button/index.mdx +0 -40
  17. package/src/dist/contents/docs/components/card/index.mdx +0 -68
  18. package/src/dist/contents/docs/components/card-group/index.mdx +0 -47
  19. package/src/dist/contents/docs/components/code-block/index.mdx +0 -39
  20. package/src/dist/contents/docs/components/custom/index.mdx +0 -38
  21. package/src/dist/contents/docs/components/file-tree/index.mdx +0 -109
  22. package/src/dist/contents/docs/components/image/index.mdx +0 -37
  23. package/src/dist/contents/docs/components/index.mdx +0 -9
  24. package/src/dist/contents/docs/components/keyboard/index.mdx +0 -117
  25. package/src/dist/contents/docs/components/link/index.mdx +0 -34
  26. package/src/dist/contents/docs/components/note/index.mdx +0 -44
  27. package/src/dist/contents/docs/components/release-note/index.mdx +0 -130
  28. package/src/dist/contents/docs/components/stepper/index.mdx +0 -45
  29. package/src/dist/contents/docs/components/tabs/index.mdx +0 -70
  30. package/src/dist/contents/docs/components/tooltips/index.mdx +0 -22
  31. package/src/dist/contents/docs/components/youtube/index.mdx +0 -23
  32. package/src/dist/contents/docs/getting-started/customize/index.mdx +0 -92
  33. package/src/dist/contents/docs/getting-started/index.mdx +0 -9
  34. package/src/dist/contents/docs/getting-started/installation/index.mdx +0 -84
  35. package/src/dist/contents/docs/getting-started/project-structure/index.mdx +0 -87
  36. package/src/dist/contents/docs/getting-started/theme-colors/coffee/index.mdx +0 -165
  37. package/src/dist/contents/docs/getting-started/theme-colors/default/index.mdx +0 -160
  38. package/src/dist/contents/docs/getting-started/theme-colors/freshlime/index.mdx +0 -161
  39. package/src/dist/contents/docs/getting-started/theme-colors/index.mdx +0 -9
  40. package/src/dist/contents/docs/getting-started/theme-colors/llms/index.mdx +0 -77
@@ -1,130 +0,0 @@
1
- ---
2
- title: Release Note
3
- description: The Release Note component makes it easy for you to write updates for each version of your application.
4
- date: 31-12-2024
5
- ---
6
-
7
- The Release Note component makes it easy for you to write and display changelogs in a structured and organized way. This component consists of two main parts: `Release` and `Changes` which can be used to display version, date, release title, and a list of changes categorized by type.
8
-
9
- ## Basic Usage
10
-
11
- Here is a basic example of using the Release Note component:
12
-
13
- ```markdown
14
- <Release version="1.10.1" date="2025-05-24" title="Accessibility Improvements and Bug Fixes">
15
- <Changes type="added">
16
- - New feature to improve accessibility
17
- - Keyboard navigation support for dialog components
18
- </Changes>
19
- <Changes type="fixed">
20
- - Bug fix for mobile menu
21
- - Fixed loading issues on documentation pages
22
- </Changes>
23
- </Release>
24
- ```
25
-
26
- <Accordion title="Render As" defaultOpen={true}>
27
- <Release version="1.10.1" date="2025-05-24" title="Accessibility Improvements and Bug Fixes">
28
- <Changes type="added">
29
- - New feature to improve accessibility
30
- - Keyboard navigation support for dialog components
31
- </Changes>
32
- <Changes type="fixed">
33
- - Bug fix for mobile menu
34
- - Fixed loading issues on documentation pages
35
- </Changes>
36
- </Release>
37
- </Accordion>
38
-
39
- ## Release Component
40
-
41
- The `Release` component is used to display key information about a release version, such as version number, release date, and title.
42
-
43
- ### Release Props
44
-
45
- | Prop | Type | Required | Description |
46
- |------|------|----------|-------------|
47
- | `version` | string | ✅ | Version number to display (without "v" prefix) |
48
- | `title` | string | ✅ | Title or name of the release |
49
- | `date` | string | ❌ | Release date in a valid format (example: "2025-05-24") |
50
- | `children` | ReactNode | ✅ | Child content, typically `Changes` components |
51
-
52
- ```markdown
53
- <Release
54
- version="1.10.1"
55
- date="2025-05-24"
56
- title="Accessibility Improvements and Bug Fixes"
57
- >
58
- {/* Changes content here */}
59
- </Release>
60
- ```
61
-
62
- ## Changes Component
63
-
64
- The `Changes` component is used to group changes by category with appropriate icons and colors.
65
-
66
- ### Changes Props
67
-
68
- | Prop | Type | Required | Description |
69
- |------|------|----------|-------------|
70
- | `type` | string | ✅ | Type of change: 'added', 'fixed', 'improved', 'deprecated', or 'removed' |
71
- | `children` | ReactNode | ✅ | List of changes, can be text with Markdown formatting |
72
-
73
- ### Changes Note
74
-
75
- | Category | Description |
76
- |----------|-------------|
77
- | `added` | New features or functionality added |
78
- | `fixed` | Bugs or issues that have been fixed |
79
- | `improved` | Enhancements or optimizations to existing features |
80
- | `deprecated` | Features that are not recommended and may be removed in future |
81
- | `removed` | Features that have been completely removed |
82
-
83
- ### Changes Example
84
-
85
- ```jsx
86
- <Changes type="added">
87
- - New feature to improve accessibility
88
- - Keyboard navigation support for dialog components
89
- </Changes>
90
-
91
- <Changes type="fixed">
92
- - Bug fix for mobile menu
93
- - Fixed loading issues on documentation pages
94
- </Changes>
95
- ```
96
-
97
- ## Complete Implementation
98
-
99
- Here is a complete example of using the Release Note component in an MDX file:
100
-
101
- ````plaintext
102
- <!-- hidden heading for TOC -->
103
-
104
- <Release version="1.10.1" date="2025-05-24" title="Accessibility Improvements and Bug Fixes">
105
- <Changes type="added">
106
- - Keyboard navigation for all interactive components
107
- - Screen reader support for table components
108
- - Dark mode feature with system preference detection
109
- </Changes>
110
-
111
- <Changes type="fixed">
112
- - Fixed mobile menu bug that wouldn't close when navigating to another page
113
- - Fixed loading issues on documentation pages
114
- - Fixed display issues in Safari browser
115
- </Changes>
116
-
117
- <Changes type="improved">
118
- - Improved page loading performance
119
- - Optimized JavaScript bundle size
120
- - Enhanced responsive design across all viewports
121
- </Changes>
122
- </Release>
123
- ````
124
-
125
- ## Usage Tips
126
-
127
- 1. **Date Format**: Use a consistent date format for all releases.
128
- 2. **Version Ordering**: Arrange versions in reverse chronological order (newest version at the top).
129
- 3. **List Items**: You can use standard Markdown list format (`-` or `*`) or write text directly, the component will handle the formatting.
130
- 4. **TOC**: Use hidden headings to ensure each version is detected in the Table of Contents. Use `<div className="sr-only">### v 1.10.1</div>`
@@ -1,45 +0,0 @@
1
- ---
2
- title: Stepper
3
- description: A component used to display step-by-step instructions directly within the markdown render.
4
- date: 14-12-2024
5
- ---
6
-
7
- In this guide, we utilize a custom `Stepper` component, specifically designed for DocuBook, which enables users to display step-by-step instructions directly within the markdown render.
8
-
9
- ## Preview
10
-
11
- <Stepper>
12
- <StepperItem title="Step 1: Clone the DocuBook Repository">
13
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec interdum,
14
- felis sed efficitur tincidunt, justo nulla viverra enim, et maximus nunc
15
- dolor in lorem.
16
- </StepperItem>
17
- <StepperItem title="Step 2: Access the Project Directory">
18
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin non neque ut
19
- eros auctor accumsan. Mauris a nisl vitae magna ultricies aliquam.
20
- </StepperItem>
21
- <StepperItem title="Step 3: Install Required Dependencies">
22
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ut
23
- ipsum nec nulla ultricies porttitor et non justo.
24
- </StepperItem>
25
- </Stepper>
26
-
27
- ## Output Markdown
28
-
29
- ```markdown
30
- <Stepper>
31
- <StepperItem title="Step 1: Clone the DocuBook Repository">
32
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec interdum,
33
- felis sed efficitur tincidunt, justo nulla viverra enim, et maximus nunc
34
- dolor in lorem.
35
- </StepperItem>
36
- <StepperItem title="Step 2: Access the Project Directory">
37
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin non neque ut
38
- eros auctor accumsan. Mauris a nisl vitae magna ultricies aliquam.
39
- </StepperItem>
40
- <StepperItem title="Step 3: Install Required Dependencies">
41
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ut
42
- ipsum nec nulla ultricies porttitor et non justo.
43
- </StepperItem>
44
- </Stepper>
45
- ```
@@ -1,70 +0,0 @@
1
- ---
2
- title: Tabs
3
- description: Organize content into multiple sections with switchable tabs.
4
- date: 14-12-2024
5
- ---
6
-
7
- The `Tabs` component allows you to organize content into multiple sections, enabling users to switch between them easily. This is particularly useful for displaying related content in a compact manner.
8
-
9
- ## Preview
10
-
11
- <Tabs defaultValue="java" className="pt-5 pb-1">
12
- <TabsList>
13
- <TabsTrigger value="java">Java</TabsTrigger>
14
- <TabsTrigger value="typescript">TypeScript</TabsTrigger>
15
- </TabsList>
16
- <TabsContent value="java">
17
- ```java
18
- // HelloWorld.java
19
- public class HelloWorld {
20
- public static void main(String[] args) {
21
- System.out.println("Hello, World!");
22
- }
23
- }
24
- ```
25
- </TabsContent>
26
- <TabsContent value="typescript">
27
- ```typescript
28
- // helloWorld.ts
29
- function helloWorld(): void {
30
- console.log("Hello, World!");
31
- }
32
- helloWorld();
33
- ```
34
- </TabsContent>
35
- </Tabs>
36
-
37
- ## Props
38
-
39
- | Prop | Type | Default | Description |
40
- | -------------- | -------- | ------- | ------------------------------------------------------ |
41
- | `defaultValue` | string | null | The value of the tab that is selected by default. |
42
- | `className` | string | null | Additional CSS classes for styling the Tabs component. |
43
-
44
- ## Output Markdown
45
-
46
- ````plaintext
47
- <Tabs defaultValue="java" className="pt-5 pb-1">
48
- <TabsList>
49
- <TabsTrigger value="java">Java</TabsTrigger>
50
- <TabsTrigger value="typescript">TypeScript</TabsTrigger>
51
- </TabsList>
52
- <TabsContent value="java">
53
- ```java
54
- // HelloWorld.java
55
- public class HelloWorld {
56
- public static void main(String[] args) {
57
- System.out.println("Hello, World!");
58
- }
59
- }
60
- ```</TabsContent>
61
- <TabsContent value="typescript">
62
- ```typescript
63
- // helloWorld.ts
64
- function helloWorld(): void {
65
- console.log("Hello, World!");
66
- }
67
- helloWorld();
68
- ```</TabsContent>
69
- </Tabs>
70
- ````
@@ -1,22 +0,0 @@
1
- ---
2
- title: Tooltips
3
- description: A component used to display additional information when hovering over a word or phrase.
4
- date: 19-02-2025
5
- ---
6
-
7
- I have implemented the `tooltips` component into markdown which allows you to add additional information to a word or phrase when hovering. This feature is useful for providing definitions, explanations, or any other additional information that can enhance the user experience.
8
-
9
- ## Usage
10
- You can use tooltips in your Markdown content to provide additional information when hovering over a word or phrase.
11
-
12
- ### Preview
13
-
14
- What do you know about <Tooltip text="DocuBook" tip="npx @docubook/create@latest" /> ? Create interactive nested documentations using MDX.
15
-
16
- ### Output Markdown
17
-
18
- The above Markdown is converted to:
19
-
20
- ```markdown:index.mdx
21
- What do you know about <Tooltip text="DocuBook" tip="npx @docubook/create@latest" /> ? Create interactive nested documentations using MDX.
22
- ```
@@ -1,23 +0,0 @@
1
- ---
2
- title: Youtube
3
- description: A component used to embed YouTube videos directly into your documentation.
4
- date: 14-12-2024
5
- ---
6
-
7
- I have implemented a `YouTube` component for your documentation. This component allows you to easily embed YouTube videos directly into your documentation by simply inputting the video's ID.
8
-
9
- ## Preview
10
-
11
- <Youtube videoId="8sM0Di7Ew9Q" />
12
-
13
- ## Output Markdown
14
-
15
- ```markdown
16
- <Youtube videoId="8sM0Di7Ew9Q" />
17
- ```
18
-
19
- ## Usage
20
-
21
- <Note type="note" title="Usage">
22
- for example the youtube URL show this https://www.youtube.com/watch?v=8sM0Di7Ew9Q the ID `8sM0Di7Ew9Q`
23
- </Note>
@@ -1,92 +0,0 @@
1
- ---
2
- title: Customize
3
- description: This guide provides instructions on customizing our application.
4
- date: 29-11-2024
5
- ---
6
-
7
- ## Markdown Options
8
-
9
- To customize Markdown parsing, navigate to `@lib/markdown.ts` and locate the `parseMdx` function. You can add your desired plugins in the `mdxOptions`. Here’s an example:
10
-
11
- ```ts:lib/markdown.ts
12
- async function parseMdx<Frontmatter>(rawMdx: string) {
13
- return await compileMDX<Frontmatter>({
14
- source: rawMdx,
15
- options: {
16
- parseFrontmatter: true,
17
- mdxOptions: {
18
- // Add your plugins here
19
- rehypePlugins: [Shiki],
20
- remarkPlugins: [remarkGfm],
21
- },
22
- },
23
- components,
24
- });
25
- }
26
- ```
27
-
28
- ## Fonts
29
-
30
- Currently, this project uses the `Geist` font. If you want to use other fonts, you can change the configuration in the main layout as shown below:
31
-
32
- ### Google Fonts
33
-
34
- To use a Google font, import your desired font from `next/font/google`, initialize it with options, and apply the variable to the `body`:
35
-
36
- ```tsx:app/layout.tsx
37
- import { Space_Grotesk } from "next/font/google";
38
-
39
- const fontSans = Space_Grotesk({
40
- display: "swap",
41
- variable: "--font-regular",
42
- weight: "400",
43
- subsets: ["latin"],
44
- });
45
-
46
- export default function RootLayout({ children }) {
47
- return (
48
- <html lang="en">
49
- <body className={`${fontSans.variable} font-regular`}>
50
- {children}
51
- </body>
52
- </html>
53
- );
54
- }
55
- ```
56
-
57
- ### Local Fonts
58
-
59
- To use a local font, you need to use the local font loader from Next.js. Pass the options and apply them to the `body`:
60
-
61
- ```tsx:app/layout.tsx
62
- import localFont from "next/font/local";
63
-
64
- const geistSans = localFont({
65
- src: "./fonts/GeistVF.woff",
66
- variable: "--font-regular",
67
- weight: "100 900",
68
- });
69
-
70
- export default function RootLayout({ children }) {
71
- return (
72
- <html lang="en">
73
- <body className={`${geistSans.variable} font-regular`}>
74
- {children}
75
- </body>
76
- </html>
77
- );
78
- }
79
- ```
80
-
81
- For both options, ensure that you add the variable to `tailwind.config.ts`:
82
-
83
- ```ts:tailwind.config.ts
84
- {
85
- // ...
86
- extend: {
87
- fontFamily: {
88
- regular: ["var(--font-regular)"],
89
- },
90
- }
91
- }
92
- ```
@@ -1,9 +0,0 @@
1
- ---
2
- title: Getting Started
3
- description: Set up Your Documentations with DocuBook
4
- date: 29-05-2025
5
- ---
6
-
7
- Welcome to DocuBook! This guide will help you set up and customize your documentation site quickly. Whether you're creating API references, user guides, or technical documentation, these components will help you build a professional and consistent documentation experience. Follow the steps below to get started with DocuBook and make the most of its powerful features.
8
-
9
- <Outlet path="getting-started" />
@@ -1,84 +0,0 @@
1
- ---
2
- title: Installation
3
- description: Installation guide for our application.
4
- date: 17-02-2025
5
- ---
6
-
7
- Setting up DocuBook is straightforward, with options to clone the repository or use the convenient `npx` command. DocuBook requires [Node.js](https://nodejs.org/) version 18 or higher for optimal performance.
8
-
9
- ## Clone Repository
10
-
11
- To get started, you can clone the DocuBook repository directly from GitHub.
12
-
13
- <Stepper>
14
- <StepperItem title="Step 1: Clone the DocuBook Repository">
15
- Begin by cloning the DocuBook repository from GitHub:
16
-
17
- ```bash
18
- git clone --branch main https://github.com/DocuBook/docubook.git
19
- ```
20
-
21
- </StepperItem>
22
-
23
- <StepperItem title="Step 2: Access the Project Directory">
24
- After cloning, navigate into the project directory to start setting up:
25
-
26
- ```bash
27
- cd docubook
28
- ```
29
-
30
- </StepperItem>
31
-
32
- <StepperItem title="Step 3: Install Required Dependencies">
33
- Install all necessary project dependencies with npm:
34
-
35
- ```bash
36
- npm install
37
- ```
38
-
39
- </StepperItem>
40
-
41
- <StepperItem title="Step 4: Launch the Development Server">
42
- Finally, start the development server to view the project locally:
43
-
44
- ```bash
45
- npm run dev
46
- ```
47
-
48
- </StepperItem>
49
- </Stepper>
50
-
51
- ## Quick Setup with CLI
52
-
53
- For a faster setup, use the `cli` command to create a new DocuBook project in one step:
54
-
55
- <Tabs defaultValue="npm" className="pt-5 pb-1">
56
- <TabsList>
57
- <TabsTrigger value="npm">npm</TabsTrigger>
58
- <TabsTrigger value="pnpm">pnpm</TabsTrigger>
59
- <TabsTrigger value="bun">bun</TabsTrigger>
60
- <TabsTrigger value="yarn">yarn</TabsTrigger>
61
- </TabsList>
62
- <TabsContent value="npm">
63
- ```shell
64
- npx @docubook/create@latest
65
- ```
66
- </TabsContent>
67
- <TabsContent value="pnpm">
68
- ```shell
69
- pnpm dlx @docubook/create@latest
70
- ```
71
- </TabsContent>
72
- <TabsContent value="bun">
73
- ```shell
74
- bunx @docubook/create@latest
75
- ```
76
- </TabsContent>
77
- <TabsContent value="yarn">
78
- ```shell
79
- yarn dlx @docubook/create@latest
80
- ```
81
- </TabsContent>
82
- </Tabs>
83
-
84
- With this setup, you’ll have a ready-to-use DocuBook instance to start building your documentation.
@@ -1,87 +0,0 @@
1
- ---
2
- title: Project Structure
3
- description: This section provides an overview of Project Structure.
4
- date: 29-11-2024
5
- ---
6
-
7
- ## app
8
-
9
- This folder contains the main application code for Next.js, managing layouts, routing, and specific content pages. It is organized to support both the `docs` sections, with dedicated pages and layouts for each section.
10
-
11
- ```
12
- app // Main Next.js application folder
13
- ├── page.tsx // Hero page - the entry point of the app showcasing key content
14
- ├── layout.tsx // Main layout file, applies global navigation and footer
15
- └── docs
16
- ├── layout.tsx // Documentation layout with sidebar, providing easy navigation across doc pages
17
- └── [[...slug]] // Catch-all route to handle nested documentation pages, allowing flexible doc structure
18
- ```
19
-
20
- ## components
21
-
22
- This folder contains all reusable components used throughout the project. It’s structured to categorize components, making it easy to locate and manage UI elements, Markdown customizations, and navigation.
23
-
24
- ```
25
- components // Reusable components
26
- ├── ui // ShadCN components, includes standardized UI elements like buttons, forms, and modals
27
- ├── markdown // Custom Markdown components for rendering rich Markdown content
28
- │ ├── CodeBlock.tsx // Component for rendering syntax-highlighted code blocks
29
- │ ├── Image.tsx // Component for handling responsive images in Markdown
30
- │ └── Table.tsx // Component to render tables with consistent styling
31
- └── navbar.tsx // Main navigation component for the site header, managing links and responsive behavior
32
- ```
33
-
34
- ## styles
35
-
36
- This folder contains global and component-specific CSS files, allowing for project-wide styling consistency and customizations.
37
-
38
- ```
39
- styles // CSS files
40
- ├── globals.css // Global CSS file, includes Tailwind base, utilities, and custom global styles
41
- ├── syntax.css // Syntax highlighting styles, providing consistent code block appearance across the site
42
- └── overrides.css // Additional custom styles that override specific component or plugin defaults
43
- ```
44
-
45
- ## contents
46
-
47
- This folder stores all Markdown content for the documentation and blog sections, with clear organization by content type. Each Markdown file represents a single piece of content, with frontmatter used for metadata.
48
-
49
- ```
50
- contents // Markdown content for blogs and documentation
51
- ├── docs // Documentation content, structured to support nested sections and pages
52
- │ ├── getting-started // Main Folder at the Contents
53
- │ └─── installation // Subfolder for tutorial-style content
54
- | └── index.mdx // Step-by-step tutorial on a specific topic
55
- ```
56
-
57
- ## public
58
-
59
- This folder holds all static assets, such as images, videos, fonts, and icons. These files are directly accessible via URL, so it’s important to avoid sensitive or private content here.
60
-
61
- ```
62
- public // Publicly accessible assets
63
- ├── images // Image assets, used across various parts of the app
64
- │ ├── og-image.png // Default opengraph image for thumbnail
65
- │ └── docu.svg // Your site Logo
66
- ├── favicon.ico // Favicon for the app
67
- └── videos // Video files for media content, if any
68
- ```
69
-
70
- ## lib
71
-
72
- This folder contains helper functions and utilities used across the application, such as Markdown parsing and routing logic. These utilities help keep the codebase clean and organized by separating out common functionality.
73
-
74
- ```
75
- lib // Utility or helper functions
76
- ├── changelog.ts // Change log for the app, used to display recent changes and updates
77
- ├── markdown.ts // Markdown parsing logic, converts Markdown to HTML and adds custom components
78
- ├── routes-config.ts // Routing configuration for docs, maps URLs to content files for dynamic routing
79
- └── utils.tsx // General utility functions used across the app, such as data formatting and validation helpers
80
- ```
81
-
82
- ## Additional
83
-
84
- - **`package.json`**: Contains metadata about the project, dependencies, and scripts for building and running the application.
85
- - **`tailwind.config.ts`**: Configures Tailwind CSS, allowing customization of theme colors, fonts, and responsive breakpoints specific to this project.
86
-
87
- This structure organizes your project in a way that supports scalability and maintainability, making it easier to navigate and work on different sections of the application.