First create a project, then create a docs folder
mkdir my-project && cd my-project
mkdir docs && cd docsCreate a index.html file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
<body>
<div id="app"></div>
</body>
<script src="//unpkg.com/docsify" data-router></script>
</html>Create README.md as the main page
# Title
## balabala
Push and open the GitHub Pages feature

Easy to setup and preivew a docs.
npm i docsify-cli -gSetup a boilerplate docs
docsify init docsPreview and serve your docs using
docsify serve docsRead more docsify-cli
Currently available vue.css and buble.css
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css">Minified files
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css">If you need other pages, directly create the markdown file, such as guide.md is /#/guide.
Code in index.html
<nav>
<a href="/#/docsify/">En</a>
<a href="/#/docsify/zh-cn">中文</a>
</nav>Through the markdown can generate a cover page. create a _coverpage.md and set data-coverpage in script tag.

# docsify <small>1.2.0</small>
> 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)Display the GitHub Corner widget.
<script src="//unpkg.com/docsify" data-repo="your/repo"></script>Toc level.
<script src="//unpkg.com/docsify" data-max-level="6"></script>Root element.
<script src="//unpkg.com/docsify" data-el="#app"></script>Sidebar with toggle
<script src="//unpkg.com/docsify" data-sidebar-toggle></script>Custom sidebar. if it'set, the TOC will be disabeld. Bind global variables on the data-sidebar.
<script>
window.sidebar = [
{ slug: '/', title: 'Home' },
{
slug: '/pageA',
title: 'page A',
children: [
{ slug: '/pageA/childrenB', title: 'children B' }
]
},
{ slug: '/PageC', title: 'Page C' }
]
</script>
<script src="/lib/docsify.js" data-sidebar="sidebar"></script>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 TOC.
** you should add .nojekyll into docs folder, to prevent GitHub Pages from ignoring the _sidebar.md**
<script src="/lib/docsify.js" data-load-sidebar></script>You can specify a file:
<script src="/lib/docsify.js" data-load-sidebar="_sidebar.md"></script>The contents of the file can be:
- [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)Load navbar markdown file. If it is configured, load the current directory _navbar.md by default.
<script src="/lib/docsify.js" data-load-navbar></script>You can specify a file:
<script src="/lib/docsify.js" data-load-navbar="_navbar.md"></script>The contents of the file can be:
- [en](/)
- [chinese](/zh-cn)If you write a sub level list, it will generate a dropdown list.
- [download](/download)
- language
- [en](/)
- [chinese](/zh-cn)Hash router.
<script src="/lib/docsify.js" data-router></script>Scroll to the top on changing hash.
<script src="/lib/docsify.js" data-auto2top></script>README.md will be render as homepage for your website in 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):
<script src="/lib/docsify.js" data-homepage="https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md"></script>
<!-- Or using `Welcome.md` as homepge -->
<script src="/lib/docsify.js" data-homepage="Welcome.md"></script>If your HTML entry file and the markdown files are in different directories, we can use:
<script src="/lib/docsify.js" data-base-path="/base/"></script>
<!-- Even if the docs is on another site 😄 -->
<script src="/lib/docsify.js" data-base-path="https://docsify.js.org/"></script>Generate cover page.
<script src="/lib/docsify.js" data-coverpage></script>
<!-- or -->
<script src="/lib/docsify.js" data-coverpage="other.md"></script>