You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/gitbook.mdx
+57-30Lines changed: 57 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,33 @@
1
1
---
2
2
sidebar_position: 2.5
3
3
sidebar_label: Gitbook Migration
4
-
slug: /gitbook-migration
4
+
slug: /gitbook-to-docusaurus-migration
5
5
description: How to migrate from GitBook to Docusaurus
6
6
---
7
7
8
8
# Migrate GitBook to Docusaurus
9
9
10
-
This page explains how to migrate from GitBook to Docusaurus. For newcomers, Docusaurus is a static-site generator. It builds a single-page application with fast client-side navigation, leveraging the full power of React to make your site interactive. It provides out-of-the-box documentation features but can be used to create any kind of site (personal website, product, blog, marketing landing pages, etc).
10
+
This page explains how to **Migrate from GitBook to Docusaurus**.
11
+
For newcomers, [Docusaurus](https://docusaurus.io/) is a `static-site generator` (SSG) that builds documentation into a `Single-Page Application` (SPA) with fast client-side navigation,
12
+
leveraging the full power of **React** to make your site interactive.
13
+
14
+
It provides `out-of-the-box documentation` features but can be used to create any kind of site (personal website, product, blog, marketing landing pages, etc).
11
15
12
16
## Key Features
13
17
14
18
Docusaurus is built with high attention to the developer and contributor experience.
15
19
16
-
⚛️ Built with 💚 and React:
20
+
> ⚛️ **Built with React**
17
21
18
22
Extend and customize with React
19
23
Gain full control of your site's browsing experience by providing your own React components
20
24
21
-
Pluggable:
25
+
> ⚙️ **Pluggable**
22
26
23
27
Bootstrap your site with a basic template, then use advanced features and plugins
24
28
Open source your plugins to share with the community
25
29
26
-
✂️ Developer experience:
30
+
> ✂️ **Developer experience**
27
31
28
32
Start writing your docs right now
29
33
Universal configuration entry point to make it more maintainable by contributors
@@ -32,38 +36,40 @@ Route-based code and data splitting
32
36
Publish to GitHub Pages, Netlify, Vercel, and other deployment services with ease
33
37
Our shared goal—to help your users quickly find what they need and understand your products better. We share our best practices to help you build your docs site right and well.
34
38
35
-
🎯 SEO friendly:
39
+
> 🎯 **SEO friendly**
36
40
37
41
HTML files are statically generated for every possible path.
38
42
Page-specific SEO to help your users land on your official docs directly relating their problems at hand.
39
43
40
-
📝 Powered by MDX:
44
+
> 📝 **Powered by MDX**
41
45
42
46
Write interactive components via JSX and React embedded in Markdown.
43
47
Share your code in live editors to get your users to love your products on the spot.
44
48
45
-
🔍 Search:
49
+
> 🔍 **Search**
50
+
46
51
Your full site is searchable.
47
52
48
-
💾 Document Versioning:
53
+
> 💾 **Document Versioning**
49
54
50
55
Helps you keep documentation in sync with project releases.
51
56
52
-
🌍 Internationalization (i18n):
53
-
Translate your site in multiple locales.
57
+
> 🌍 **Internationalization (i18n)**
54
58
55
-
Docusaurus 2 is born to be compassionately accessible to all your users, and lightning-fast.
59
+
Translate your site in multiple locales. Docusaurus 2 is born to be compassionately accessible to all your users, and lightning-fast.
56
60
57
-
⚡️ Lightning-fast.
61
+
> ⚡️ **Lightning-fast**
58
62
59
63
Docusaurus 2 follows the PRPL Pattern that makes sure your content loads blazing fast.
60
64
61
-
🦖 Accessible.
65
+
> 🦖 **Accessible**
66
+
62
67
Attention to accessibility, making your site equally accessible to all users.
63
68
64
-
# Migration Steps
65
69
66
-
## step 1 - Generate a new Docusaurus site
70
+
## Migration Steps
71
+
72
+
### ✅ `Step 1` - Generate a new **Docusaurus** site
67
73
68
74
Generate a new Docusaurus site using the classic template.
69
75
@@ -77,7 +83,8 @@ You can type this command into Command Prompt, Powershell, Terminal, or any othe
77
83
78
84
The command also installs all necessary dependencies you need to run Docusaurus.
79
85
80
-
## step 2 - Start your site
86
+
87
+
### ✅ `Step 2` - **Start your site**
81
88
82
89
Run the development server:
83
90
@@ -92,7 +99,8 @@ The npm run start command builds your website locally and serves it through a de
92
99
93
100
Open docs/intro.md (this page) and edit some lines: the site reloads automatically and displays your changes.
94
101
95
-
## step 3 - copy documentation content from GitBook to docusaurus
102
+
103
+
### ✅ `Step 3` - **Copy Markdown Content** from `GitBook`
96
104
97
105
1. First Navigate to docs folder and delee the generated tutorial docs from docusaurus ,
98
106
2. Navigate to gibook project folder copy all contents except .git and .gibook and move them to the docusaurus project under docs/
@@ -102,20 +110,22 @@ Open docs/intro.md (this page) and edit some lines: the site reloads automatical
102
110
103
111
### Solution
104
112
105
-
go to docusaurus.config.js at the root of the project Edit themeConfig:navbar:items[0] change docId docId: "app-generator",
113
+
go to docusaurus.config.js at the root of the project Edit themeConfig:navbar:items[0] change docId: "app-generator",
106
114
to one of the available doc ids from the error above
107
115
108
-
5.Build the project run:
116
+
### `Step 4` - **Build the Project**:
109
117
110
118
```bash
111
119
npm run build
112
120
```
113
121
114
-
# SSR
122
+
## SSR
123
+
124
+
### ✅ `Step 1` - **Create a SSR folder**
115
125
116
-
1. Create a ssr folder on the root of docusaurus project
126
+
This needs to be done in the root of the project
117
127
118
-
2.Create file index.js inside ssr folder and add below code
Curious minds can use this `Open-Source`**Docusaurus Starter** styled with [Soft UI Design](https://bit.ly/soft-design-system), an open-source design from `Creative-Tim` - Actively supported by [AppSeed](https://appseed.us/).
0 commit comments