Skip to content

Commit e3cf9ea

Browse files
committed
Update gitbook.mdx
1 parent c36bc84 commit e3cf9ea

File tree

1 file changed

+57
-30
lines changed

1 file changed

+57
-30
lines changed

docs/gitbook.mdx

Lines changed: 57 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
---
22
sidebar_position: 2.5
33
sidebar_label: Gitbook Migration
4-
slug: /gitbook-migration
4+
slug: /gitbook-to-docusaurus-migration
55
description: How to migrate from GitBook to Docusaurus
66
---
77

88
# Migrate GitBook to Docusaurus
99

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).
1115

1216
## Key Features
1317

1418
Docusaurus is built with high attention to the developer and contributor experience.
1519

16-
⚛️ Built with 💚 and React:
20+
> ⚛️ **Built with React**
1721
1822
Extend and customize with React
1923
Gain full control of your site's browsing experience by providing your own React components
2024

21-
Pluggable:
25+
> ⚙️ **Pluggable**
2226
2327
Bootstrap your site with a basic template, then use advanced features and plugins
2428
Open source your plugins to share with the community
2529

26-
✂️ Developer experience:
30+
> ✂️ **Developer experience**
2731
2832
Start writing your docs right now
2933
Universal configuration entry point to make it more maintainable by contributors
@@ -32,38 +36,40 @@ Route-based code and data splitting
3236
Publish to GitHub Pages, Netlify, Vercel, and other deployment services with ease
3337
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.
3438

35-
🎯 SEO friendly:
39+
> 🎯 **SEO friendly**
3640
3741
HTML files are statically generated for every possible path.
3842
Page-specific SEO to help your users land on your official docs directly relating their problems at hand.
3943

40-
📝 Powered by MDX:
44+
> 📝 **Powered by MDX**
4145
4246
Write interactive components via JSX and React embedded in Markdown.
4347
Share your code in live editors to get your users to love your products on the spot.
4448

45-
🔍 Search:
49+
> 🔍 **Search**
50+
4651
Your full site is searchable.
4752

48-
💾 Document Versioning:
53+
> 💾 **Document Versioning**
4954
5055
Helps you keep documentation in sync with project releases.
5156

52-
🌍 Internationalization (i18n):
53-
Translate your site in multiple locales.
57+
> 🌍 **Internationalization (i18n)**
5458
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.
5660

57-
⚡️ Lightning-fast.
61+
> ⚡️ **Lightning-fast**
5862
5963
Docusaurus 2 follows the PRPL Pattern that makes sure your content loads blazing fast.
6064

61-
🦖 Accessible.
65+
> 🦖 **Accessible**
66+
6267
Attention to accessibility, making your site equally accessible to all users.
6368

64-
# Migration Steps
6569

66-
## step 1 - Generate a new Docusaurus site
70+
## Migration Steps
71+
72+
### `Step 1` - Generate a new **Docusaurus** site
6773

6874
Generate a new Docusaurus site using the classic template.
6975

@@ -77,7 +83,8 @@ You can type this command into Command Prompt, Powershell, Terminal, or any othe
7783

7884
The command also installs all necessary dependencies you need to run Docusaurus.
7985

80-
## step 2 - Start your site
86+
87+
### `Step 2` - **Start your site**
8188

8289
Run the development server:
8390

@@ -92,7 +99,8 @@ The npm run start command builds your website locally and serves it through a de
9299

93100
Open docs/intro.md (this page) and edit some lines: the site reloads automatically and displays your changes.
94101

95-
## step 3 - copy documentation content from GitBook to docusaurus
102+
103+
### `Step 3` - **Copy Markdown Content** from `GitBook`
96104

97105
1. First Navigate to docs folder and delee the generated tutorial docs from docusaurus ,
98106
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
102110

103111
### Solution
104112

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",
106114
to one of the available doc ids from the error above
107115

108-
5. Build the project run:
116+
### `Step 4` - **Build the Project**:
109117

110118
```bash
111119
npm run build
112120
```
113121

114-
# SSR
122+
## SSR
123+
124+
### `Step 1` - **Create a SSR folder**
115125

116-
1. Create a ssr folder on the root of docusaurus project
126+
This needs to be done in the root of the project
117127

118-
2. Create file index.js inside ssr folder and add below code
128+
### `Step 2` - **Create file index.js** inside `SSR`` folder and add below code
119129

120130
```jsx title="/ssr/index.js"
121131
const express = require("express");
@@ -130,12 +140,6 @@ const distFolder = path.join(process.cwd(), "../build");
130140
app.set("view engine", "html");
131141
app.set("views", distFolder);
132142

133-
// app.get(
134-
// "/appSeed//.(js|css|map|ico|svg|png|jpg|jpeg)$/",
135-
// express.static(distFolder, {
136-
// maxAge: "1y",
137-
// })
138-
// );
139143
// serve static assets
140144
app.get(/\.(js|css|map|ico|svg|png|jpg|jpeg|woff2)$/, express.static(path.resolve(__dirname, "../build")));
141145

@@ -152,6 +156,7 @@ app.get("/sitemap.xml", (req, res) => {
152156

153157
return res.send(indexHTML);
154158
});
159+
155160
app.get("/opensearch.xml", (req, res) => {
156161
let indexHTML = fs.readFileSync(path.resolve(__dirname, "../build/" + req.originalUrl), {
157162
encoding: "utf8",
@@ -163,6 +168,7 @@ app.get("/opensearch.xml", (req, res) => {
163168

164169
return res.send(indexHTML);
165170
});
171+
166172
app.get("/favicon.ico", (req, res) => {
167173
let indexHTML = fs.readFileSync(path.resolve(__dirname, "../build/" + req.originalUrl), {
168174
encoding: "utf8",
@@ -204,8 +210,29 @@ app.listen("9000", () => {
204210
});
205211
```
206212

207-
3. run the ssr version of the app after building project
213+
### `Step 3` - **Run/test the SSR version** of the app after building project
208214

209215
```bash
210216
node ssr/index.js
211217
```
218+
219+
## [Docusaurus Soft Design](https://github.com/app-generator/docusaurus-soft-design) `Sample`
220+
221+
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/).
222+
223+
> Features
224+
225+
- 🚀 `Blazing Fast` - [SEE Demo](https://docusaurus-soft-design.onrender.com/)
226+
-`Up-to-date dependencies`
227+
-**Docusaurus v2**
228+
- ✅ Modern UI: **[Soft UI Design](https://bit.ly/soft-design-system)**, `Dark-Mode`
229+
-`Versioned Content`
230+
-`MIT License`, Free **Support**
231+
232+
![Docusaurus Soft UI Design - Open-source DOCS Starter.](https://user-images.githubusercontent.com/51070104/221350480-512c0088-84dd-49ac-a277-c09d0449054a.jpg)
233+
234+
235+
## Links & Resources
236+
237+
- 👉 Contact `AppSeed` using the [support](https://appseed.us/support/) page
238+
- 👉 Use the [App Generator](https://appseed.us/generator) to generate a new project

0 commit comments

Comments
 (0)