## Quick Start ### Create a project First create a project, then create a `docs` folder ```shell mkdir my-project && cd my-project mkdir docs && cd docs ``` ### Create entry file Create a `index.html` file ```html
``` Create `README.md` as the main page ``` # Title ## blabla ``` ### Deploy! Push and open the **GitHub Pages** feature  ## CLI Easy to setup and preview a docs. ### Install ```shell npm i docsify-cli -g ``` ### Setup Setup a boilerplate docs ```shell docsify init docs ``` ### Preview Preview and serve your docs using ```shell docsify serve docs ``` Read more [docsify-cli](https://github.com/QingWei-Li/docsify-cli) ## Themes Currently available `vue.css` and `buble.css` ```html ``` Minified files ```html ``` ## More ### Multiple pages If you need other pages, directly create the markdown file, such as `guide.md` is `/#/guide`. ### Navbar Code in `index.html` ```html ``` ### CDN - UNPKG [https://unpkg.com/docsify/](https://unpkg.com/docsify/) - jsDelivr [http://www.jsdelivr.com/projects/docsify](http://www.jsdelivr.com/projects/docsify) ### Cover Page Generate a cover page through with markdown. Create a `_coverpage.md` and set `data-coverpage` in script tag. ```markdown  # docsify 1.2.0 > A magical documentation site generator. - Simple and lightweight (~12kb gzipped) - Multiple themes - Not build static html files [GitHub](https://github.com/QingWei-Li/docsify/) [Get Started](#quick-start) ``` #### Custom background Currently the background of cover page is generated randomly. We can customize the background, just using the syntax to add image. ```markdown # docsify 1.2.0 > xxx [GitHub](https://github.com/QingWei-Li/docsify/) [Get Started](#quick-start)   ``` ### Options #### repo Display the [GitHub Corner](http://tholman.com/github-corners/) widget. ```html ``` #### max-level TOC level. ```html ``` #### el Root element. ```html ``` #### sidebar-toggle Sidebar with toggle ```html ``` #### sidebar Custom sidebar. If it's set, the TOC will be disabled. Bind global variables on the `data-sidebar`.  ```html ``` #### load-sidebar Load sidebar markdown file. If it is configured, load the current directory `_sidebar.md` by default. If the file isn't exist, sidebar will appear as a TOC. ** you should add `.nojekyll` into docs folder to prevent GitHub Pages from ignoring the `_sidebar.md`** ```html ``` You can specify a file: ```html ``` The contents of the file can be: ```markdown - [Home](/) - [Installation](/installation) - Essentials - [Getting Started](/getting-started) - [Dynamic Route Matching](/dynamic-matching) - [Nested Routes](/nested-routes) - [Programmatic Navigation](/navigation) - [Named Routes](/named-routes) - [Named Views](/named-views) - [Redirect and Alias](/redirect-and-alias) - [HTML5 History Mode](/history-mode) ``` #### sub-max-level Display TOC in the custom sidebar. The default value is 0. ```html ```  #### load-navbar Load navbar markdown file. If it is configured, load the current directory `_navbar.md` by default. ```html ``` You can specify a file: ```html ``` The contents of the file can be: ```markdown - [en](/) - [chinese](/zh-cn) ``` If you write a sub level list, it will generate a dropdown list. ```markdown - [download](/download) - language - [en](/) - [chinese](/zh-cn) ``` #### router Hash router. ```html ``` #### auto2top Scroll to the top on changing hash. ```html ``` #### homepage `README.md` will be rendered as a homepage for your website in the docs folder, but sometimes we want to specify another file as a homepage, or even use the `README.md` in your repo. We can use (need `data-router`): ```html ``` #### basePath If your HTML entry file and the markdown files are in different directories, we can use: ```html ``` #### coverpage Generate cover page. ```html ```