@docubook/create 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/dist/app/docs/[[...slug]]/page.tsx +56 -63
- package/src/dist/app/docs/layout.tsx +11 -4
- package/src/dist/app/layout.tsx +10 -9
- package/src/dist/app/page.tsx +3 -22
- package/src/dist/components/{context-popover.tsx → ContextPopover.tsx} +4 -3
- package/src/dist/components/{docs-breadcrumb.tsx → DocsBreadcrumb.tsx} +1 -1
- package/src/dist/components/{docs-menu.tsx → DocsMenu.tsx} +2 -2
- package/src/dist/components/DocsNavbar.tsx +46 -0
- package/src/dist/components/DocsSidebar.tsx +196 -0
- package/src/dist/components/Github.tsx +26 -0
- package/src/dist/components/{scroll-to-top.tsx → ScrollToTop.tsx} +16 -9
- package/src/dist/components/SearchBox.tsx +37 -0
- package/src/dist/components/SearchContext.tsx +47 -0
- package/src/dist/components/SearchModal.tsx +2 -2
- package/src/dist/components/SearchTrigger.tsx +5 -5
- package/src/dist/components/Sponsor.tsx +2 -2
- package/src/dist/components/{theme-toggle.tsx → ThemeToggle.tsx} +10 -10
- package/src/dist/components/TocObserver.tsx +197 -0
- package/src/dist/components/footer.tsx +16 -12
- package/src/dist/components/leftbar.tsx +45 -73
- package/src/dist/components/markdown/AccordionGroupMdx.tsx +1 -1
- package/src/dist/components/markdown/AccordionMdx.tsx +4 -4
- package/src/dist/components/markdown/CardMdx.tsx +4 -4
- package/src/dist/components/markdown/FileTreeMdx.tsx +4 -4
- package/src/dist/components/markdown/ImageMdx.tsx +1 -1
- package/src/dist/components/markdown/ReleaseMdx.tsx +1 -1
- package/src/dist/components/markdown/TooltipsMdx.tsx +1 -1
- package/src/dist/components/navbar.tsx +130 -53
- package/src/dist/components/sublink.tsx +1 -1
- package/src/dist/components/toc.tsx +16 -14
- package/src/dist/components/typography.tsx +1 -1
- package/src/dist/components/ui/icon-cloud.tsx +353 -0
- package/src/dist/components/ui/scroll-area.tsx +2 -2
- package/src/dist/components/ui/sheet.tsx +4 -4
- package/src/dist/components/ui/toggle.tsx +3 -3
- package/src/dist/docs/components/accordion-group.mdx +68 -0
- package/src/dist/docs/components/accordion.mdx +59 -0
- package/src/dist/docs/components/button.mdx +40 -0
- package/src/dist/docs/components/card-group.mdx +47 -0
- package/src/dist/docs/components/card.mdx +68 -0
- package/src/dist/docs/components/code-block.mdx +67 -0
- package/src/dist/docs/components/custom.mdx +38 -0
- package/src/dist/docs/components/file-tree.mdx +109 -0
- package/src/dist/docs/components/image.mdx +37 -0
- package/src/dist/docs/components/index.mdx +9 -0
- package/src/dist/docs/components/keyboard.mdx +117 -0
- package/src/dist/docs/components/link.mdx +34 -0
- package/src/dist/docs/components/note.mdx +44 -0
- package/src/dist/docs/components/release-note.mdx +114 -0
- package/src/dist/docs/components/stepper.mdx +45 -0
- package/src/dist/docs/components/tables.mdx +35 -0
- package/src/dist/docs/components/tabs.mdx +72 -0
- package/src/dist/docs/components/tooltips.mdx +22 -0
- package/src/dist/docs/components/youtube.mdx +23 -0
- package/src/dist/docs/getting-started/introduction.mdx +18 -0
- package/src/dist/docs/getting-started/quick-start-guide.mdx +60 -0
- package/src/dist/docu.json +36 -33
- package/src/dist/eslint.config.mjs +17 -30
- package/src/dist/hooks/useActiveSection.ts +34 -32
- package/src/dist/hooks/useScrollPosition.ts +16 -14
- package/src/dist/lib/markdown.ts +32 -17
- package/src/dist/lib/utils.ts +1 -1
- package/src/dist/next.config.mjs +10 -11
- package/src/dist/package.json +1 -1
- package/src/dist/styles/algolia.css +11 -9
- package/src/dist/styles/{syntax.css → override.css} +82 -39
- package/src/dist/tailwind.config.ts +11 -110
- package/src/dist/components/GithubStart.tsx +0 -44
- package/src/dist/components/mob-toc.tsx +0 -134
- package/src/dist/components/search.tsx +0 -55
- package/src/dist/components/toc-observer.tsx +0 -254
- package/src/dist/docs/api-reference/delete/index.mdx +0 -63
- package/src/dist/docs/api-reference/fetch/index.mdx +0 -63
- package/src/dist/docs/api-reference/get/index.mdx +0 -63
- package/src/dist/docs/api-reference/post/index.mdx +0 -63
- package/src/dist/docs/changelog/index.mdx +0 -49
- package/src/dist/docs/getting-started/development/index.mdx +0 -92
- package/src/dist/docs/getting-started/introduction/index.mdx +0 -92
- package/src/dist/docs/getting-started/quick-start-guide/index.mdx +0 -92
- /package/src/dist/components/{edit-on-github.tsx → EditWithGithub.tsx} +0 -0
- /package/src/dist/components/{contexts/theme-provider.tsx → ThemeProvider.tsx} +0 -0
- /package/src/dist/{components/contexts/AccordionContext.ts → lib/accordion-context.ts} +0 -0
- /package/src/dist/lib/{routes-config.ts → routes.ts} +0 -0
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import Link from "next/link";
|
|
5
|
-
import { useState, useRef, useEffect, useCallback } from "react";
|
|
6
|
-
import { motion } from "framer-motion";
|
|
7
|
-
import { ScrollToTop } from "./scroll-to-top";
|
|
8
|
-
import { TocItem } from "@/lib/toc";
|
|
9
|
-
|
|
10
|
-
interface TocObserverProps {
|
|
11
|
-
data: TocItem[];
|
|
12
|
-
activeId?: string | null;
|
|
13
|
-
onActiveIdChange?: (id: string | null) => void;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default function TocObserver({
|
|
17
|
-
data,
|
|
18
|
-
activeId: externalActiveId,
|
|
19
|
-
onActiveIdChange
|
|
20
|
-
}: TocObserverProps) {
|
|
21
|
-
const [internalActiveId, setInternalActiveId] = useState<string | null>(null);
|
|
22
|
-
const observer = useRef<IntersectionObserver | null>(null);
|
|
23
|
-
const [clickedId, setClickedId] = useState<string | null>(null);
|
|
24
|
-
const itemRefs = useRef<Map<string, HTMLAnchorElement>>(new Map());
|
|
25
|
-
|
|
26
|
-
// Use external activeId if provided, otherwise use internal state
|
|
27
|
-
const activeId = externalActiveId !== undefined ? externalActiveId : internalActiveId;
|
|
28
|
-
const setActiveId = onActiveIdChange || setInternalActiveId;
|
|
29
|
-
|
|
30
|
-
// Handle intersection observer for auto-highlighting
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
const handleIntersect = (entries: IntersectionObserverEntry[]) => {
|
|
33
|
-
const visibleEntries = entries.filter(entry => entry.isIntersecting);
|
|
34
|
-
|
|
35
|
-
// Find the most recently scrolled-into-view element
|
|
36
|
-
const mostVisibleEntry = visibleEntries.reduce((prev, current) => {
|
|
37
|
-
// Prefer the entry that's more visible or higher on the page
|
|
38
|
-
const prevRatio = prev?.intersectionRatio || 0;
|
|
39
|
-
const currentRatio = current.intersectionRatio;
|
|
40
|
-
|
|
41
|
-
if (currentRatio > prevRatio) return current;
|
|
42
|
-
if (currentRatio === prevRatio &&
|
|
43
|
-
current.boundingClientRect.top < prev.boundingClientRect.top) {
|
|
44
|
-
return current;
|
|
45
|
-
}
|
|
46
|
-
return prev;
|
|
47
|
-
}, visibleEntries[0]);
|
|
48
|
-
|
|
49
|
-
if (mostVisibleEntry && !clickedId) {
|
|
50
|
-
const newActiveId = mostVisibleEntry.target.id;
|
|
51
|
-
if (newActiveId !== activeId) {
|
|
52
|
-
setActiveId(newActiveId);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
observer.current = new IntersectionObserver(handleIntersect, {
|
|
58
|
-
root: null,
|
|
59
|
-
rootMargin: "-20% 0px -70% 0px", // Adjusted margins for better section detection
|
|
60
|
-
threshold: [0, 0.1, 0.5, 0.9, 1], // Multiple thresholds for better accuracy
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const elements = data.map((item) =>
|
|
64
|
-
document.getElementById(item.href.slice(1))
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
elements.forEach((el) => {
|
|
68
|
-
if (el && observer.current) {
|
|
69
|
-
observer.current.observe(el);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
// Set initial active ID if none is set
|
|
74
|
-
if (!activeId && elements[0]) {
|
|
75
|
-
setActiveId(elements[0].id);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return () => {
|
|
79
|
-
if (observer.current) {
|
|
80
|
-
elements.forEach((el) => {
|
|
81
|
-
if (el) {
|
|
82
|
-
observer.current!.unobserve(el);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
}, [data, clickedId, activeId, setActiveId]);
|
|
88
|
-
|
|
89
|
-
const handleLinkClick = useCallback((id: string) => {
|
|
90
|
-
setClickedId(id);
|
|
91
|
-
setActiveId(id);
|
|
92
|
-
|
|
93
|
-
// Reset the clicked state after a delay to allow for smooth scrolling
|
|
94
|
-
const timer = setTimeout(() => {
|
|
95
|
-
setClickedId(null);
|
|
96
|
-
}, 1000);
|
|
97
|
-
|
|
98
|
-
return () => clearTimeout(timer);
|
|
99
|
-
}, [setActiveId]);
|
|
100
|
-
|
|
101
|
-
// Function to check if an item has children
|
|
102
|
-
const hasChildren = (currentId: string, currentLevel: number) => {
|
|
103
|
-
const currentIndex = data.findIndex(item => item.href.slice(1) === currentId);
|
|
104
|
-
if (currentIndex === -1 || currentIndex === data.length - 1) return false;
|
|
105
|
-
|
|
106
|
-
const nextItem = data[currentIndex + 1];
|
|
107
|
-
return nextItem.level > currentLevel;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// Calculate scroll progress for the active section
|
|
111
|
-
const [scrollProgress, setScrollProgress] = useState(0);
|
|
112
|
-
|
|
113
|
-
useEffect(() => {
|
|
114
|
-
const handleScroll = () => {
|
|
115
|
-
if (!activeId) return;
|
|
116
|
-
|
|
117
|
-
const activeElement = document.getElementById(activeId);
|
|
118
|
-
if (!activeElement) return;
|
|
119
|
-
|
|
120
|
-
const rect = activeElement.getBoundingClientRect();
|
|
121
|
-
const windowHeight = window.innerHeight;
|
|
122
|
-
const elementTop = rect.top;
|
|
123
|
-
const elementHeight = rect.height;
|
|
124
|
-
|
|
125
|
-
// Calculate how much of the element is visible
|
|
126
|
-
let progress = 0;
|
|
127
|
-
if (elementTop < windowHeight) {
|
|
128
|
-
progress = Math.min(1, (windowHeight - elementTop) / (windowHeight + elementHeight));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
setScrollProgress(progress);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
window.addEventListener('scroll', handleScroll, { passive: true });
|
|
135
|
-
return () => window.removeEventListener('scroll', handleScroll);
|
|
136
|
-
}, [activeId]);
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
return (
|
|
140
|
-
<div className="relative">
|
|
141
|
-
<div className="relative text-sm text-foreground/70 hover:text-foreground transition-colors">
|
|
142
|
-
<div className="flex flex-col gap-0">
|
|
143
|
-
{data.map(({ href, level, text }, index) => {
|
|
144
|
-
const id = href.slice(1);
|
|
145
|
-
const isActive = activeId === id;
|
|
146
|
-
const indent = level > 1 ? (level - 1) * 20 : 0;
|
|
147
|
-
// Prefix with underscore to indicate intentionally unused
|
|
148
|
-
const _isParent = hasChildren(id, level);
|
|
149
|
-
const _isLastInLevel = index === data.length - 1 || data[index + 1].level <= level;
|
|
150
|
-
|
|
151
|
-
return (
|
|
152
|
-
<div key={href} className="relative">
|
|
153
|
-
{/* Simple L-shaped connector */}
|
|
154
|
-
{level > 1 && (
|
|
155
|
-
<div
|
|
156
|
-
className={clsx("absolute top-0 h-full w-6", {
|
|
157
|
-
"left-[6px]": indent === 20, // Level 2
|
|
158
|
-
"left-[22px]": indent === 40, // Level 3
|
|
159
|
-
"left-[38px]": indent === 60, // Level 4
|
|
160
|
-
})}
|
|
161
|
-
>
|
|
162
|
-
{/* Vertical line */}
|
|
163
|
-
<div className={clsx(
|
|
164
|
-
"absolute left-0 top-0 h-full w-px",
|
|
165
|
-
isActive ? "bg-primary/20 dark:bg-primary/30" : "bg-border/50 dark:bg-border/50"
|
|
166
|
-
)}>
|
|
167
|
-
{isActive && (
|
|
168
|
-
<motion.div
|
|
169
|
-
className="absolute left-0 top-0 w-full h-full bg-primary origin-top"
|
|
170
|
-
initial={{ scaleY: 0 }}
|
|
171
|
-
animate={{ scaleY: scrollProgress }}
|
|
172
|
-
transition={{ duration: 0.3 }}
|
|
173
|
-
/>
|
|
174
|
-
)}
|
|
175
|
-
</div>
|
|
176
|
-
|
|
177
|
-
{/* Horizontal line */}
|
|
178
|
-
<div className={clsx(
|
|
179
|
-
"absolute left-0 top-1/2 h-px w-6",
|
|
180
|
-
isActive ? "bg-primary/20 dark:bg-primary/30" : "bg-border/50 dark:bg-border/50"
|
|
181
|
-
)}>
|
|
182
|
-
{isActive && (
|
|
183
|
-
<motion.div
|
|
184
|
-
className="absolute left-0 top-0 h-full w-full bg-primary dark:bg-accent origin-left"
|
|
185
|
-
initial={{ scaleX: 0 }}
|
|
186
|
-
animate={{ scaleX: scrollProgress }}
|
|
187
|
-
transition={{ duration: 0.3, delay: 0.1 }}
|
|
188
|
-
/>
|
|
189
|
-
)}
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
)}
|
|
193
|
-
|
|
194
|
-
<Link
|
|
195
|
-
href={href}
|
|
196
|
-
onClick={() => handleLinkClick(id)}
|
|
197
|
-
className={clsx(
|
|
198
|
-
"relative flex items-center py-2 transition-colors",
|
|
199
|
-
{
|
|
200
|
-
"text-primary dark:text-primary font-medium": isActive,
|
|
201
|
-
"text-muted-foreground hover:text-foreground dark:hover:text-foreground/90": !isActive,
|
|
202
|
-
}
|
|
203
|
-
)}
|
|
204
|
-
style={{
|
|
205
|
-
paddingLeft: `${indent}px`,
|
|
206
|
-
marginLeft: level > 1 ? '12px' : '0',
|
|
207
|
-
}}
|
|
208
|
-
ref={(el) => {
|
|
209
|
-
const map = itemRefs.current;
|
|
210
|
-
if (el) {
|
|
211
|
-
map.set(id, el);
|
|
212
|
-
} else {
|
|
213
|
-
map.delete(id);
|
|
214
|
-
}
|
|
215
|
-
}}
|
|
216
|
-
>
|
|
217
|
-
{/* Circle indicator */}
|
|
218
|
-
<div className="relative w-4 h-4 flex items-center justify-center flex-shrink-0">
|
|
219
|
-
<div className={clsx(
|
|
220
|
-
"w-1.5 h-1.5 rounded-full transition-all duration-300 relative z-10",
|
|
221
|
-
{
|
|
222
|
-
"bg-primary scale-100 dark:bg-primary/90": isActive,
|
|
223
|
-
"bg-muted-foreground/30 dark:bg-muted-foreground/30 scale-75 group-hover:scale-100 group-hover:bg-primary/50 dark:group-hover:bg-primary/50": !isActive,
|
|
224
|
-
}
|
|
225
|
-
)}>
|
|
226
|
-
{isActive && (
|
|
227
|
-
<motion.div
|
|
228
|
-
className="absolute inset-0 rounded-full bg-primary/20 dark:bg-primary/30"
|
|
229
|
-
initial={{ scale: 1 }}
|
|
230
|
-
animate={{ scale: 1.8 }}
|
|
231
|
-
transition={{
|
|
232
|
-
duration: 2,
|
|
233
|
-
repeat: Infinity,
|
|
234
|
-
repeatType: "reverse"
|
|
235
|
-
}}
|
|
236
|
-
/>
|
|
237
|
-
)}
|
|
238
|
-
</div>
|
|
239
|
-
</div>
|
|
240
|
-
|
|
241
|
-
<span className="truncate text-sm">
|
|
242
|
-
{text}
|
|
243
|
-
</span>
|
|
244
|
-
</Link>
|
|
245
|
-
</div>
|
|
246
|
-
);
|
|
247
|
-
})}
|
|
248
|
-
</div>
|
|
249
|
-
</div>
|
|
250
|
-
{/* Add scroll to top link at the bottom of TOC */}
|
|
251
|
-
<ScrollToTop className="mt-6" />
|
|
252
|
-
</div>
|
|
253
|
-
);
|
|
254
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title : Delete
|
|
3
|
-
description : example api DELETE
|
|
4
|
-
date : 10-12-2024
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Heading 2
|
|
8
|
-
|
|
9
|
-
this is regular text written in markdown format with `inline code`, **bold**, and *italic*
|
|
10
|
-
|
|
11
|
-
### Heading 3
|
|
12
|
-
|
|
13
|
-
example of ordered list format :
|
|
14
|
-
|
|
15
|
-
- list one
|
|
16
|
-
- sub list
|
|
17
|
-
- list two
|
|
18
|
-
- list three
|
|
19
|
-
|
|
20
|
-
#### Heading 4
|
|
21
|
-
|
|
22
|
-
Below is an example of how to write a code block :
|
|
23
|
-
|
|
24
|
-
````plaintext
|
|
25
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
26
|
-
function isRocketAboutToCrash() {
|
|
27
|
-
// Check if the rocket is stable
|
|
28
|
-
if (!isStable()) {
|
|
29
|
-
NoCrash(); // Prevent the crash
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
````
|
|
34
|
-
|
|
35
|
-
example note :
|
|
36
|
-
```plaintext
|
|
37
|
-
<Note type="note" title="Note">
|
|
38
|
-
This is a general note to convey information to the user.
|
|
39
|
-
</Note>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
displaying an image in markdown format :
|
|
43
|
-
|
|
44
|
-
```plaintext
|
|
45
|
-

|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
render as :
|
|
49
|
-

|
|
50
|
-
|
|
51
|
-
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
|
-
|
|
53
|
-
<Note type="warning" title="Warning">
|
|
54
|
-
every page that is indexed in a folder will have an `index.mdx` file with metadata :
|
|
55
|
-
```plaintext
|
|
56
|
-
---
|
|
57
|
-
title : Introduction
|
|
58
|
-
description : overview or synopsis of a project
|
|
59
|
-
date : 10-12-2024
|
|
60
|
-
image : example-img.png
|
|
61
|
-
---
|
|
62
|
-
```
|
|
63
|
-
</Note>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title : Fetch
|
|
3
|
-
description : example api FETCH
|
|
4
|
-
date : 10-12-2024
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Heading 2
|
|
8
|
-
|
|
9
|
-
this is regular text written in markdown format with `inline code`, **bold**, and *italic*
|
|
10
|
-
|
|
11
|
-
### Heading 3
|
|
12
|
-
|
|
13
|
-
example of ordered list format :
|
|
14
|
-
|
|
15
|
-
- list one
|
|
16
|
-
- sub list
|
|
17
|
-
- list two
|
|
18
|
-
- list three
|
|
19
|
-
|
|
20
|
-
#### Heading 4
|
|
21
|
-
|
|
22
|
-
Below is an example of how to write a code block :
|
|
23
|
-
|
|
24
|
-
````plaintext
|
|
25
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
26
|
-
function isRocketAboutToCrash() {
|
|
27
|
-
// Check if the rocket is stable
|
|
28
|
-
if (!isStable()) {
|
|
29
|
-
NoCrash(); // Prevent the crash
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
````
|
|
34
|
-
|
|
35
|
-
example note :
|
|
36
|
-
```plaintext
|
|
37
|
-
<Note type="note" title="Note">
|
|
38
|
-
This is a general note to convey information to the user.
|
|
39
|
-
</Note>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
displaying an image in markdown format :
|
|
43
|
-
|
|
44
|
-
```plaintext
|
|
45
|
-

|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
render as :
|
|
49
|
-

|
|
50
|
-
|
|
51
|
-
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
|
-
|
|
53
|
-
<Note type="warning" title="Warning">
|
|
54
|
-
every page that is indexed in a folder will have an `index.mdx` file with metadata :
|
|
55
|
-
```plaintext
|
|
56
|
-
---
|
|
57
|
-
title : Introduction
|
|
58
|
-
description : overview or synopsis of a project
|
|
59
|
-
date : 10-12-2024
|
|
60
|
-
image : example-img.png
|
|
61
|
-
---
|
|
62
|
-
```
|
|
63
|
-
</Note>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title : Get
|
|
3
|
-
description : example api GET
|
|
4
|
-
date : 10-12-2024
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Heading 2
|
|
8
|
-
|
|
9
|
-
this is regular text written in markdown format with `inline code`, **bold**, and *italic*
|
|
10
|
-
|
|
11
|
-
### Heading 3
|
|
12
|
-
|
|
13
|
-
example of ordered list format :
|
|
14
|
-
|
|
15
|
-
- list one
|
|
16
|
-
- sub list
|
|
17
|
-
- list two
|
|
18
|
-
- list three
|
|
19
|
-
|
|
20
|
-
#### Heading 4
|
|
21
|
-
|
|
22
|
-
Below is an example of how to write a code block :
|
|
23
|
-
|
|
24
|
-
````plaintext
|
|
25
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
26
|
-
function isRocketAboutToCrash() {
|
|
27
|
-
// Check if the rocket is stable
|
|
28
|
-
if (!isStable()) {
|
|
29
|
-
NoCrash(); // Prevent the crash
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
````
|
|
34
|
-
|
|
35
|
-
example note :
|
|
36
|
-
```plaintext
|
|
37
|
-
<Note type="note" title="Note">
|
|
38
|
-
This is a general note to convey information to the user.
|
|
39
|
-
</Note>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
displaying an image in markdown format :
|
|
43
|
-
|
|
44
|
-
```plaintext
|
|
45
|
-

|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
render as :
|
|
49
|
-

|
|
50
|
-
|
|
51
|
-
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
|
-
|
|
53
|
-
<Note type="warning" title="Warning">
|
|
54
|
-
every page that is indexed in a folder will have an `index.mdx` file with metadata :
|
|
55
|
-
```plaintext
|
|
56
|
-
---
|
|
57
|
-
title : Introduction
|
|
58
|
-
description : overview or synopsis of a project
|
|
59
|
-
date : 10-12-2024
|
|
60
|
-
image : example-img.png
|
|
61
|
-
---
|
|
62
|
-
```
|
|
63
|
-
</Note>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title : Post
|
|
3
|
-
description : example api POST
|
|
4
|
-
date : 10-12-2024
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Heading 2
|
|
8
|
-
|
|
9
|
-
this is regular text written in markdown format with `inline code`, **bold**, and *italic*
|
|
10
|
-
|
|
11
|
-
### Heading 3
|
|
12
|
-
|
|
13
|
-
example of ordered list format :
|
|
14
|
-
|
|
15
|
-
- list one
|
|
16
|
-
- sub list
|
|
17
|
-
- list two
|
|
18
|
-
- list three
|
|
19
|
-
|
|
20
|
-
#### Heading 4
|
|
21
|
-
|
|
22
|
-
Below is an example of how to write a code block :
|
|
23
|
-
|
|
24
|
-
````plaintext
|
|
25
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
26
|
-
function isRocketAboutToCrash() {
|
|
27
|
-
// Check if the rocket is stable
|
|
28
|
-
if (!isStable()) {
|
|
29
|
-
NoCrash(); // Prevent the crash
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
````
|
|
34
|
-
|
|
35
|
-
example note :
|
|
36
|
-
```plaintext
|
|
37
|
-
<Note type="note" title="Note">
|
|
38
|
-
This is a general note to convey information to the user.
|
|
39
|
-
</Note>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
displaying an image in markdown format :
|
|
43
|
-
|
|
44
|
-
```plaintext
|
|
45
|
-

|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
render as :
|
|
49
|
-

|
|
50
|
-
|
|
51
|
-
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
|
-
|
|
53
|
-
<Note type="warning" title="Warning">
|
|
54
|
-
every page that is indexed in a folder will have an `index.mdx` file with metadata :
|
|
55
|
-
```plaintext
|
|
56
|
-
---
|
|
57
|
-
title : Introduction
|
|
58
|
-
description : overview or synopsis of a project
|
|
59
|
-
date : 10-12-2024
|
|
60
|
-
image : example-img.png
|
|
61
|
-
---
|
|
62
|
-
```
|
|
63
|
-
</Note>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title : Changelog
|
|
3
|
-
description : changelog version
|
|
4
|
-
date : 10-12-2024
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Output Markdown
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
<Release version="1.0.0" date="2025-08-10" title="Release version 1.0.0">
|
|
11
|
-
<Changes type="added">
|
|
12
|
-
- add components
|
|
13
|
-
</Changes>
|
|
14
|
-
<Changes type="fixed">
|
|
15
|
-
- fix globals.css
|
|
16
|
-
</Changes>
|
|
17
|
-
<Changes type="improved">
|
|
18
|
-
- improved search components
|
|
19
|
-
</Changes>
|
|
20
|
-
<Changes type="deprecated">
|
|
21
|
-
- deprecated footer components
|
|
22
|
-
</Changes>
|
|
23
|
-
<Changes type="removed">
|
|
24
|
-
- removed utility class
|
|
25
|
-
- removed unused hooks
|
|
26
|
-
</Changes>
|
|
27
|
-
</Release>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Render as
|
|
31
|
-
|
|
32
|
-
<Release version="1.0.0" date="2025-08-10" title="Release version 1.0.0">
|
|
33
|
-
<Changes type="added">
|
|
34
|
-
- add components
|
|
35
|
-
</Changes>
|
|
36
|
-
<Changes type="fixed">
|
|
37
|
-
- fix globals.css
|
|
38
|
-
</Changes>
|
|
39
|
-
<Changes type="improved">
|
|
40
|
-
- improved search components
|
|
41
|
-
</Changes>
|
|
42
|
-
<Changes type="deprecated">
|
|
43
|
-
- deprecated footer components
|
|
44
|
-
</Changes>
|
|
45
|
-
<Changes type="removed">
|
|
46
|
-
- removed utility class
|
|
47
|
-
- removed unused hooks
|
|
48
|
-
</Changes>
|
|
49
|
-
</Release>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title : Development
|
|
3
|
-
description : for Development server and production
|
|
4
|
-
date : 10-12-2024
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Heading 2
|
|
8
|
-
|
|
9
|
-
this is regular text written in markdown format with `inline code`, **bold**, and *italic*
|
|
10
|
-
|
|
11
|
-
### Heading 3
|
|
12
|
-
|
|
13
|
-
example of ordered list format :
|
|
14
|
-
|
|
15
|
-
- list one
|
|
16
|
-
- sub list
|
|
17
|
-
- list two
|
|
18
|
-
- list three
|
|
19
|
-
|
|
20
|
-
#### Heading 4
|
|
21
|
-
|
|
22
|
-
## Code Block
|
|
23
|
-
Below is an example of how to write a code block :
|
|
24
|
-
|
|
25
|
-
````plaintext
|
|
26
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
27
|
-
function isRocketAboutToCrash() {
|
|
28
|
-
// Check if the rocket is stable
|
|
29
|
-
if (!isStable()) {
|
|
30
|
-
NoCrash(); // Prevent the crash
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
````
|
|
35
|
-
|
|
36
|
-
<Accordion title="Code Block" defaultOpen={true} icon="Code">
|
|
37
|
-
```javascript:main.js showLineNumbers {3-4}
|
|
38
|
-
function isRocketAboutToCrash() {
|
|
39
|
-
// Check if the rocket is stable
|
|
40
|
-
if (!isStable()) {
|
|
41
|
-
NoCrash(); // Prevent the crash
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
</Accordion>
|
|
46
|
-
|
|
47
|
-
## Note
|
|
48
|
-
example note :
|
|
49
|
-
```plaintext
|
|
50
|
-
<Note type="note" title="Note">
|
|
51
|
-
This is a general note to convey information to the user.
|
|
52
|
-
</Note>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
<Note type="warning" title="Warning">
|
|
56
|
-
every page that is indexed in a folder will have an `index.mdx` file with metadata :
|
|
57
|
-
```plaintext
|
|
58
|
-
---
|
|
59
|
-
title : Introduction
|
|
60
|
-
description : overview or synopsis of a project
|
|
61
|
-
date : 10-12-2024
|
|
62
|
-
image : example-img.png
|
|
63
|
-
---
|
|
64
|
-
```
|
|
65
|
-
</Note>
|
|
66
|
-
|
|
67
|
-
## Image
|
|
68
|
-
displaying an image in markdown format :
|
|
69
|
-
|
|
70
|
-
```plaintext
|
|
71
|
-

|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
render as :
|
|
75
|
-

|
|
76
|
-
|
|
77
|
-
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
78
|
-
|
|
79
|
-
## Table
|
|
80
|
-
|
|
81
|
-
### Default Table
|
|
82
|
-
|
|
83
|
-
| Property | Description | Type | Default |
|
|
84
|
-
| --- | --- | --- | --- |
|
|
85
|
-
| `title` | The title of the table | `string` | - |
|
|
86
|
-
| `description` | The description of the table | `string` | - |
|
|
87
|
-
|
|
88
|
-
### Table with Alignment
|
|
89
|
-
| Left | Center | Right |
|
|
90
|
-
| :--- | :---: | ---: |
|
|
91
|
-
| Left-aligned text | Center-aligned text | Right-aligned text |
|
|
92
|
-
| Left-aligned text | Center-aligned text | Right-aligned text |
|