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
Convert your docs folder into a pretty docs website using [Docsify-JS](https://docsify.js.org/) and some minimal setup. This project can be used as a template or reference for your own.
7
7
8
8
9
-
## Setup
10
-
11
-
### Overview steps
9
+
## Basics to get a site working
12
10
13
11
1. Add a few files to your existing docs folder. You can use this project's files to get you going.
14
-
-**index page** - Homepage of the your docs site. This will setup the app using the _docsify_ library, set a theme and apply other configurations.
15
-
-**sidebar** - Describes your menu layout. As _docsify_ is not aware of directory structure so it may not function as you hope without this file.
12
+
-**index page** - Homepage of the your docs site. This will setup the app using the _Docsify_ library, set a theme and apply other configurations.
13
+
-**sidebar** - Describes your menu layout. As _Docsify_ is not aware of directory structure so it may not function as you hope without this file.
16
14
-**cover page** - Optional landing page with background image and minimal text.
17
15
2. Update your Github repo's config so that you will get a Github Pages site built from your docs directory. _Docsify_ also works with _Netlify_ as per their docs, but this project just considers the Github Pages case.
18
16
19
17
Note that this works _without_ editing your existing docs and _without_ building any HTML pages. The rendering is done on the client-side in a single page application, running on _index.html_.
20
18
21
-
22
19
## Setup a site
23
20
24
21
Since the idea is to add to an existing project, is it not that useful to create your own project from this repo. But you should copy the sample files from this project in your own project's docs directory.
25
22
26
-
TBC - How copy files
23
+
### Copy files
24
+
25
+
TBC
26
+
27
+
### Configure index page
28
+
29
+
TBC
30
+
31
+
### Configure sidebar
27
32
33
+
Note file paths are relative to docs directory.
34
+
35
+
With sidebar enabled and not sidebar details set, your index page will use its own page outline as the menu but with no access to subpages.
36
+
37
+
The top of the side bar will point to the site's root - this will take you to the top of the cover page, rather than the _README.md_. You can create a first item in the sidebar which points to the _README.md_ top element, but that will sort of duplicate having the sidebar heading leading to small confusion for a user.
38
+
39
+
### Configure cover page
40
+
41
+
TBC
28
42
29
43
### Style
30
44
31
45
Edit _index.html_.
32
46
33
47
#### Color
34
48
35
-
Set a theme color. Defaults to green if not set. This affects how some content looks, such as quoted blocks, underlined text and buttons.
49
+
Set a theme color. Defaults to theme's default if not set - green for Vue and blue for Buble.
50
+
51
+
This variable affects how some content looks, such as quoted blocks, underlined text and buttons.
36
52
37
53
```js
38
54
window.$docsify= {
39
-
themeColor:'#3F51B5'
55
+
themeColor:'#3F51B5',
40
56
};
41
57
```
42
58
@@ -73,4 +89,4 @@ The CLI tool is optional and is useful for the following:
73
89
74
90
If you were using a static site generator like Jekyll, you might have to add front matter to your docs, in addition to setting Jekyll config for theme and menu layout.
75
91
76
-
Also, with a static site generator you would build HTML files to serve, while with docsify there is a single page application running off of a _index.html_ - on each request, a markdown file is fetched by the client and rendered as HTML with a theme and menu.
92
+
Also, with a static site generator you would build HTML files to serve, while with Docsify there is a single page application running off of a _index.html_ - on each request, a markdown file is fetched by the client and rendered as HTML with a theme and menu.
0 commit comments