diff --git a/contents/docs/getting-started/changelog/index.mdx b/contents/docs/changelog/version-1/index.mdx
similarity index 96%
rename from contents/docs/getting-started/changelog/index.mdx
rename to contents/docs/changelog/version-1/index.mdx
index bf56408..8a84149 100644
--- a/contents/docs/getting-started/changelog/index.mdx
+++ b/contents/docs/changelog/version-1/index.mdx
@@ -8,6 +8,23 @@ date: 24-05-2025
> This changelog contains a list of all the changes made to the DocuBook template. It will be updated with each new release and will include information about new features, bug fixes, and other improvements.
+
+### v 1.13.0
+
+
+
+
+ - New ContextMenu component for organizing file and folder
+ - Nested docs folder and file support with context menu
+
+
+ - improve routes-config with context menu
+ - improve docu.json with context menu
+ - improve leftbar with context menu
+ - improve docs-menu with context menu
+
+
+
### v 1.12.0
diff --git a/contents/docs/getting-started/components/accordion/index.mdx b/contents/docs/components/accordion/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/accordion/index.mdx
rename to contents/docs/components/accordion/index.mdx
diff --git a/contents/docs/getting-started/components/button/index.mdx b/contents/docs/components/button/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/button/index.mdx
rename to contents/docs/components/button/index.mdx
diff --git a/contents/docs/getting-started/components/card-group/index.mdx b/contents/docs/components/card-group/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/card-group/index.mdx
rename to contents/docs/components/card-group/index.mdx
diff --git a/contents/docs/getting-started/components/card/index.mdx b/contents/docs/components/card/index.mdx
similarity index 91%
rename from contents/docs/getting-started/components/card/index.mdx
rename to contents/docs/components/card/index.mdx
index a43aae5..1efb174 100644
--- a/contents/docs/getting-started/components/card/index.mdx
+++ b/contents/docs/components/card/index.mdx
@@ -41,9 +41,9 @@ The Card component is a component used to create cards that can be used to displ
- Card with Link & Icon
- Card Horizontal
- Card Simple
+ Link & Icon
+ Horizontal
+ Simple
```markdown
diff --git a/contents/docs/getting-started/components/code-block/index.mdx b/contents/docs/components/code-block/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/code-block/index.mdx
rename to contents/docs/components/code-block/index.mdx
diff --git a/contents/docs/getting-started/components/custom/index.mdx b/contents/docs/components/custom/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/custom/index.mdx
rename to contents/docs/components/custom/index.mdx
diff --git a/contents/docs/getting-started/components/file-tree/index.mdx b/contents/docs/components/file-tree/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/file-tree/index.mdx
rename to contents/docs/components/file-tree/index.mdx
diff --git a/contents/docs/getting-started/components/image/index.mdx b/contents/docs/components/image/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/image/index.mdx
rename to contents/docs/components/image/index.mdx
diff --git a/contents/docs/getting-started/components/keyboard/index.mdx b/contents/docs/components/keyboard/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/keyboard/index.mdx
rename to contents/docs/components/keyboard/index.mdx
diff --git a/contents/docs/getting-started/components/link/index.mdx b/contents/docs/components/link/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/link/index.mdx
rename to contents/docs/components/link/index.mdx
diff --git a/contents/docs/getting-started/components/note/index.mdx b/contents/docs/components/note/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/note/index.mdx
rename to contents/docs/components/note/index.mdx
diff --git a/contents/docs/getting-started/components/release-note/index.mdx b/contents/docs/components/release-note/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/release-note/index.mdx
rename to contents/docs/components/release-note/index.mdx
diff --git a/contents/docs/getting-started/components/stepper/index.mdx b/contents/docs/components/stepper/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/stepper/index.mdx
rename to contents/docs/components/stepper/index.mdx
diff --git a/contents/docs/getting-started/components/tabs/index.mdx b/contents/docs/components/tabs/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/tabs/index.mdx
rename to contents/docs/components/tabs/index.mdx
diff --git a/contents/docs/getting-started/components/tooltips/index.mdx b/contents/docs/components/tooltips/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/tooltips/index.mdx
rename to contents/docs/components/tooltips/index.mdx
diff --git a/contents/docs/getting-started/components/youtube/index.mdx b/contents/docs/components/youtube/index.mdx
similarity index 100%
rename from contents/docs/getting-started/components/youtube/index.mdx
rename to contents/docs/components/youtube/index.mdx
diff --git a/contents/docs/getting-started/components/index.mdx b/contents/docs/getting-started/components/index.mdx
deleted file mode 100644
index 8388d1d..0000000
--- a/contents/docs/getting-started/components/index.mdx
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Components
-description: This section provides an overview of the custom components available in DocuBook.
-date: 29-11-2024
----
-
-Explore the custom components we've defined for easy integration and development within your projects. Each component is designed to enhance your workflow and streamline your development process.
-
-
diff --git a/contents/docs/getting-started/customize/index.mdx b/contents/docs/getting-started/customize/index.mdx
index a347547..15ad1f7 100644
--- a/contents/docs/getting-started/customize/index.mdx
+++ b/contents/docs/getting-started/customize/index.mdx
@@ -90,5 +90,3 @@ For both options, ensure that you add the variable to `tailwind.config.ts`:
}
}
```
-
-For theme and colors, refer to the [Theme section](/docs/getting-started/themes)
diff --git a/contents/docs/getting-started/installation/index.mdx b/contents/docs/getting-started/installation/index.mdx
index aa315bc..1c88f2e 100644
--- a/contents/docs/getting-started/installation/index.mdx
+++ b/contents/docs/getting-started/installation/index.mdx
@@ -15,7 +15,7 @@ To get started, you can clone the DocuBook repository directly from GitHub.
Begin by cloning the DocuBook repository from GitHub:
```bash
- git clone --branch starter https://gitlab.com/mywildancloud/docubook.git
+ git clone --branch main https://github.com/DocuBook/docubook.git
```
diff --git a/contents/docs/getting-started/introduction/index.mdx b/contents/docs/getting-started/introduction/index.mdx
index b7a75a3..9a40c72 100644
--- a/contents/docs/getting-started/introduction/index.mdx
+++ b/contents/docs/getting-started/introduction/index.mdx
@@ -13,7 +13,7 @@ DocuBook is proudly **open-source**! 🎉 We believe in creating an accessible,
Interested in helping us improve? Check out our [GitHub
- repository](https://github.com/gitfromwildan/docubook) to get started! From
+ repository](https://github.com/DocuBook/docubook) to get started! From
feature suggestions to bug fixes, all contributions are welcome.
diff --git a/contents/docs/getting-started/quick-start-guide/index.mdx b/contents/docs/getting-started/quick-start-guide/index.mdx
index 87647a2..b5d7810 100644
--- a/contents/docs/getting-started/quick-start-guide/index.mdx
+++ b/contents/docs/getting-started/quick-start-guide/index.mdx
@@ -4,11 +4,11 @@ description: Get up and running with DocuBook in minutes with this comprehensive
date: 20-05-2025
---
-Welcome to DocuBook! This guide will help you set up your documentation site quickly and efficiently.
+Welcome to DocuBook! This guide will help you set up and customize your documentation site efficiently.
## Prerequisites
-Before we begin, make sure you have the following installed:
+Before we begin, ensure you have the following installed:
- [Git](https://git-scm.com/)
- [Node.js 18+](https://nodejs.org/) or [Bun 1.0+](https://bun.sh/)
@@ -16,112 +16,130 @@ Before we begin, make sure you have the following installed:
## Installation
-
- Follow the instructions on the [installation page](/docs/getting-started/installation) to install the required dependencies and set up your project.
+
+ Follow the [installation guide](/docs/getting-started/installation) to set up your project dependencies and configuration.
## Project Setup
-### Customize Branding
+### Configuration
-
- Place your favicon at `public/favicon.ico`
+
+ Place your favicon at `public/favicon.ico` for browser tab display.
-
- Place your logo at `public/images/docu.svg` (SVG format recommended)
+
+ Add your logo at `public/images/docu.svg` (SVG format recommended for scalability).
-
- Edit `docu.json` to update site name, description, and other settings
+
+ Customize your site's metadata in `docu.json`:
+ - Site title and description
+ - Navigation structure
+ - Default theme settings
-## Creating Content
+## Content Management
### File Structure
-DocuBook uses the following structure:
+DocuBook organizes content in a hierarchical structure:
-````plaintext
+```plaintext
contents/
- docs/
- getting-started/
- quick-start-guide/ <-- You are here
+ docs/ # Main documentation directory
+ getting-started/ # Section for getting started guides
+ quick-start-guide/ # Current guide
+ index.mdx # Main content file
+ guides/ # Additional documentation sections
+ components/ # Component-specific documentation
index.mdx
- guides/
- components/
- index.mdx
-````
+```
-### Adding New Pages
+### Creating New Content
-
- Create a new folder in `contents/docs/getting-started/` for your content section
+
+ Organize your documentation by creating a new directory:
```bash
- mkdir -p contents/docs/getting-started/your-page-title
+ mkdir -p contents/docs/your-section/your-topic
+ ```
+
+ Example for an API reference:
+ ```bash
+ mkdir -p contents/docs/api/authentication
```
-
- Create an `index.mdx` file with frontmatter:
+
+
+ Add an `index.mdx` file with frontmatter metadata:
````markdown
---
- title: Your Page Title
- description: Brief description of your page
- date: 20-05-2025
+ title: Authentication
+ description: Learn how to implement user authentication
+ date: 2025-05-29
---
- # Your Content Here
+ Your comprehensive guide to implementing authentication in your application.
- Start writing your documentation using Markdown or MDX components.
+ ## Getting Started
+
+ Start by setting up your authentication provider...
````
-
- Update the navigation in `docu.json`:
- ```json:docu.json showLineNumbers {8}
-{
+
+
+ Add your new section to the navigation in `docu.json`. Here's how to add the authentication section we created earlier:
+
+ ```json:docu.json showLineNumbers {4-16}
+ {
"routes": [
+ // ... existing routes ...
{
- "title": "Getting Started",
- "href": "/getting-started",
- "noLink": true,
- "items": [
- { "title": "Your Page Title", "href": "/your-page-title" } // Add your page here separated by comma `,`
- ]
+ "title": "API",
+ "href": "/api",
+ "noLink": true,
+ "context": {
+ "icon": "Code2",
+ "description": "API Reference and Integration",
+ "title": "API"
+ },
+ "items": [
+ { "title": "Authentication", "href": "/authentication" }
+ ]
}
- ]
-}
+ ]
+ }
```
+
+ This will add a new "API" section with an "Authentication" page under it. The `context` object defines how this section appears in the navigation, including its icon and description.
-## Development
+## Development Workflow
-Start the development server:
+### Local Development
+
+Start the development server with live reload:
```bash
+# Using npm
npm run dev
-# or
+
+# Or using Bun
bun dev
```
-Visit [http://localhost:3000](http://localhost:3000) to see your site.
+Access your site at [http://localhost:3000](http://localhost:3000)
-## Building for Production
+### Building for Production
-When you're ready to deploy:
+When ready to deploy:
```bash
+# Build the production version
npm run build
+
+# Start the production server
npm start
```
-
-## Need Help?
-
-
- Check out the [Components Guide](/docs/getting-started/components) to learn about all available components.
-
-
-
- Make sure to commit your changes to version control before deploying.
-
diff --git a/docu.json b/docu.json
index 5faf775..cf6c8c4 100644
--- a/docu.json
+++ b/docu.json
@@ -61,35 +61,58 @@
"title": "Getting Started",
"href": "/getting-started",
"noLink": true,
+ "context": {
+ "icon": "Book",
+ "description": "Set up your Documentation",
+ "title": "Guides"
+ },
"items": [
{ "title": "Introduction", "href": "/introduction" },
{ "title": "Installation", "href": "/installation" },
{ "title": "Quick Start Guide", "href": "/quick-start-guide" },
{ "title": "Project Structure", "href": "/project-structure" },
- {
- "title": "Components",
- "href": "/components",
- "items": [
- { "title": "Accordion", "href": "/accordion" },
- { "title": "Button", "href": "/button" },
- { "title": "Card", "href": "/card" },
- { "title": "Card Group", "href": "/card-group" },
- { "title": "Code Block", "href": "/code-block" },
- { "title": "File Tree", "href": "/file-tree" },
- { "title": "Image", "href": "/image" },
- { "title": "Keyboard", "href": "/keyboard" },
- { "title": "Link", "href": "/link" },
- { "title": "Note", "href": "/note" },
- { "title": "Release Note", "href": "/release-note" },
- { "title": "Stepper", "href": "/stepper" },
- { "title": "Tabs", "href": "/tabs" },
- { "title": "Tooltips", "href": "/tooltips" },
- { "title": "Youtube", "href": "/youtube" },
- { "title": "Custom", "href": "/custom" }
- ]
- },
- { "title": "Customize", "href": "/customize" },
- { "title": "Changelog", "href": "/changelog" }
+ { "title": "Customize", "href": "/customize" }
+ ]
+ },
+ {
+ "title": "Components",
+ "href": "/components",
+ "noLink": true,
+ "context": {
+ "icon": "Layers",
+ "description": "Write with Markdown",
+ "title": "Markdown"
+ },
+ "items": [
+ { "title": "Accordion", "href": "/accordion" },
+ { "title": "Button", "href": "/button" },
+ { "title": "Card", "href": "/card" },
+ { "title": "Card Group", "href": "/card-group" },
+ { "title": "Code Block", "href": "/code-block" },
+ { "title": "File Tree", "href": "/file-tree" },
+ { "title": "Image", "href": "/image" },
+ { "title": "Keyboard", "href": "/keyboard" },
+ { "title": "Link", "href": "/link" },
+ { "title": "Note", "href": "/note" },
+ { "title": "Release Note", "href": "/release-note" },
+ { "title": "Stepper", "href": "/stepper" },
+ { "title": "Tabs", "href": "/tabs" },
+ { "title": "Tooltips", "href": "/tooltips" },
+ { "title": "Youtube", "href": "/youtube" },
+ { "title": "Custom", "href": "/custom" }
+ ]
+ },
+ {
+ "title": "Changelog",
+ "href": "/changelog",
+ "noLink": true,
+ "context": {
+ "icon": "History",
+ "description": "Updates and changes",
+ "title": "Changelog"
+ },
+ "items": [
+ { "title": "Version 1.0+", "href": "/version-1" }
]
}
]
diff --git a/lib/routes-config.ts b/lib/routes-config.ts
index 57589ea..a5bcff2 100644
--- a/lib/routes-config.ts
+++ b/lib/routes-config.ts
@@ -1,9 +1,16 @@
import docuConfig from "@/docu.json"; // Import JSON file
+export type ContextInfo = {
+ icon: string;
+ description: string;
+ title?: string;
+};
+
export type EachRoute = {
title: string;
href: string;
- noLink?: boolean; // Sekarang mendukung boolean
+ noLink?: boolean;
+ context?: ContextInfo;
items?: EachRoute[];
};
diff --git a/package.json b/package.json
index 2c9bc90..d21fdbe 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "docubook",
- "version": "1.12.0",
+ "version": "1.13.0",
"private": true,
"scripts": {
"dev": "next dev",