## Links
-
-- [`develop` branch preview](https://docsifyjs.netlify.com/)
- [Documentation](https://docsify.js.org)
-- [CLI](https://github.com/docsifyjs/docsify-cli)
-- CDN: [UNPKG](https://unpkg.com/docsify/) | [jsDelivr](https://cdn.jsdelivr.net/npm/docsify/) | [cdnjs](https://cdnjs.com/libraries/docsify)
-- [Awesome docsify](https://github.com/docsifyjs/awesome-docsify)
-- [Community chat](https://gitter.im/docsifyjs/Lobby)
+- [CLI](https://github.com/QingWei-Li/docsify-cli)
## Features
-
-- No statically built html files
-- Simple and lightweight (~21kB gzipped)
-- Smart full-text search plugin
+- Simple and lightweight (~13kB gzipped)
- Multiple themes
-- Useful plugin API
-- Compatible with IE11
-- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
-- Support embedded files
+- Not build static html files
+- Support emoji :laughing:
## Quick start
+Create a `index.html` and using `hash router`.
-Look at [this tutorial](https://docsify.js.org/#/quickstart)
+index.html
-[](https://codesandbox.io/s/307qqv236)
+```html
+
+
+
+
+
+
+
+
+
+
+
+```
+
+## CDN
+- UNPKG [https://unpkg.com/docsify/](https://unpkg.com/docsify/)
+- jsDelivr [http://www.jsdelivr.com/projects/docsify](http://www.jsdelivr.com/projects/docsify)
## Showcase
+These open-source projects are using docsify to generate their sites. Pull requests welcome : )
-These projects are using docsify to generate their sites. Pull requests welcome :blush:
-
-Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
+- [docsify](https://docsify.js.org) - A magical documentation site generator.
+- [Snipaste](https://docs.snipaste.com/) - A new way to boost your productivity.
+- [puck](https://puck.zz173.com/) - A small & magical php framework.
+- [Samaritan](http://samaritan.stockdb.org) - An Algorithmic Trading Framework for Digital Currency.
+- [Vudash](http://vudash.github.io/vudash/) - Powerful, Flexible, Open Source dashboards for anything
+- [Trilogy](http://trilogy.js.org) - No-hassle SQLite with a Promise-based, document store style API.
## Similar projects
-
-| Project | Description |
-| ------------------------------------------------ | ---------------------------------------- |
-| [docute](https://github.com/egoist/docute) | 📜 Effortlessly documentation done right |
-| [docpress](https://github.com/docpress/docpress) | Documentation website generator |
+- [docute](https://github.com/egoist/docute) - 📜 Effortlessly documentation done right
+- [docpress](https://github.com/docpress/docpress) - Documentation website generator
## Contributing
@@ -70,42 +67,25 @@ Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
- Create your feature branch: `git checkout -b my-new-feature`
- Commit your changes: `git commit -am 'Add some feature'`
- Push to the branch: `git push origin my-new-feature`
-- Submit a pull request
+- Submit a pull request :D
+
## Development
+### prepare
```bash
-npm run bootstrap && npm run dev
+npm i && npm run dev
+open http://localhost:3000
```
-## Backers
+### More Language Highlight
-Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/docsify#backers)]
-
-
-
-## Sponsors
-
-Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/docsify#silver-sponsors)]
-
-
-
-
-
-
-
-
-
-
-
-
-## Contributors
-
-This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
-
+```html
+
+
+
+```
## License
+MIT
-[MIT](LICENSE)
-
-[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify?ref=badge_large)
diff --git a/app.js b/app.js
new file mode 100644
index 0000000..beada16
--- /dev/null
+++ b/app.js
@@ -0,0 +1,12 @@
+var serveStatic = require('serve-static')
+var http = require('http')
+var fs = require('fs')
+
+http.createServer(function (req, res) {
+ serveStatic('.')(req, res, function () {
+ res.writeHead(404, { 'Content-Type': 'text/html' })
+ res.end(fs.readFileSync('dev.html'))
+ })
+}).listen(3000, '0.0.0.0')
+
+console.log(`\nListening at http://0.0.0.0:3000\n`)
diff --git a/build/build-css.js b/build/build-css.js
new file mode 100644
index 0000000..0890c29
--- /dev/null
+++ b/build/build-css.js
@@ -0,0 +1,38 @@
+var fs = require('fs')
+var cssnano = require('cssnano').process
+var resolve = require('path').resolve
+var postcss = require('postcss')
+
+var processor = postcss([require('postcss-salad')])
+
+var saveMin = function (file, content) {
+ fs.writeFileSync(resolve(__dirname, '../lib/themes/', file), content)
+}
+var save = function (file, content) {
+ fs.writeFileSync(resolve(__dirname, '../themes/', file), content)
+}
+var load = function (file) {
+ return fs.readFileSync(resolve(__dirname, '../src/themes/', file)).toString()
+}
+var loadLib = function (file) {
+ return fs.readFileSync(resolve(__dirname, '../themes/', file)).toString()
+}
+
+var list = fs.readdirSync(resolve(__dirname, '../src/themes'))
+
+list.forEach(function (file) {
+ if (!/\.css$/.test(file)) return
+ processor.process(load(file), { from: resolve(__dirname, '../src/themes/', file) })
+ .then(function (result) {
+ save(file, result.css)
+ console.log('salad - ' + file)
+ cssnano(loadLib(file))
+ .then(function (result) {
+ saveMin(file, result.css)
+ console.log('cssnao - ' + file)
+ })
+ }).catch(function (err) {
+ console.log(err)
+ })
+})
+
diff --git a/build/build.js b/build/build.js
index 7b61224..f8a6922 100644
--- a/build/build.js
+++ b/build/build.js
@@ -1,119 +1,37 @@
-const rollup = require('rollup')
-const buble = require('rollup-plugin-buble')
-const commonjs = require('rollup-plugin-commonjs')
-const nodeResolve = require('rollup-plugin-node-resolve')
-const uglify = require('rollup-plugin-uglify')
-const replace = require('rollup-plugin-replace')
-const isProd = process.env.NODE_ENV === 'production'
-const version = process.env.VERSION || require('../package.json').version
-const chokidar = require('chokidar')
-const path = require('path')
+var rollup = require('rollup')
+var buble = require('rollup-plugin-buble')
+var commonjs = require('rollup-plugin-commonjs')
+var nodeResolve = require('rollup-plugin-node-resolve')
+var uglify = require('rollup-plugin-uglify')
-const build = function (opts) {
+var build = function (opts) {
rollup
.rollup({
- input: opts.input,
- plugins: (opts.plugins || []).concat([
- buble(),
- commonjs(),
- nodeResolve(),
- replace({
- __VERSION__: version,
- 'process.env.SSR': false
- })
- ])
+ entry: 'src/' + opts.entry,
+ plugins: [buble()].concat(opts.plugins || [])
})
.then(function (bundle) {
- var dest = 'lib/' + (opts.output || opts.input)
+ var dest = 'lib/' + (opts.output || opts.entry)
console.log(dest)
bundle.write({
format: 'iife',
- file: dest,
- strict: false
+ moduleName: opts.moduleName || 'Docsify',
+ dest: dest
})
})
.catch(function (err) {
console.error(err)
})
}
-const buildCore = function () {
- build({
- input: 'src/core/index.js',
- output: 'docsify.js'
- })
- if (isProd) {
- build({
- input: 'src/core/index.js',
- output: 'docsify.min.js',
- plugins: [uglify()]
- })
- }
-}
-const buildAllPlugin = function () {
- var plugins = [
- {name: 'search', input: 'search/index.js'},
- {name: 'ga', input: 'ga.js'},
- {name: 'matomo', input: 'matomo.js'},
- {name: 'emoji', input: 'emoji.js'},
- {name: 'external-script', input: 'external-script.js'},
- {name: 'front-matter', input: 'front-matter/index.js'},
- {name: 'zoom-image', input: 'zoom-image.js'},
- {name: 'disqus', input: 'disqus.js'},
- {name: 'gitalk', input: 'gitalk.js'}
- ]
-
- plugins.forEach(item => {
- build({
- input: 'src/plugins/' + item.input,
- output: 'plugins/' + item.name + '.js'
- })
- })
-
- if (isProd) {
- plugins.forEach(item => {
- build({
- input: 'src/plugins/' + item.input,
- output: 'plugins/' + item.name + '.min.js',
- plugins: [uglify()]
- })
- })
- }
-}
-
-if (!isProd) {
- chokidar
- .watch(['src/core', 'src/plugins'], {
- atomic: true,
- awaitWriteFinish: {
- stabilityThreshold: 1000,
- pollInterval: 100
- }
- })
- .on('change', p => {
- console.log('[watch] ', p)
- const dirs = p.split(path.sep)
- if (dirs[1] === 'core') {
- buildCore()
- } else if (dirs[2]) {
- const name = path.basename(dirs[2], '.js')
- const input = `src/plugins/${name}${
- /\.js/.test(dirs[2]) ? '' : '/index'
- }.js`
-
- build({
- input,
- output: 'plugins/' + name + '.js'
- })
- }
- })
- .on('ready', () => {
- console.log('[start]')
- buildCore()
- buildAllPlugin()
- })
-} else {
- buildCore()
- buildAllPlugin()
-}
+build({
+ entry: 'index.js',
+ output: 'docsify.js',
+ plugins: [commonjs(), nodeResolve()]
+})
+build({
+ entry: 'index.js',
+ output: 'docsify.min.js',
+ plugins: [commonjs(), nodeResolve(), uglify()]
+})
diff --git a/build/cover.js b/build/cover.js
deleted file mode 100644
index fbd27f7..0000000
--- a/build/cover.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var fs = require('fs')
-var read = fs.readFileSync
-var write = fs.writeFileSync
-var version = process.env.VERSION || require('../package.json').version
-
-var file = __dirname + '/../docs/_coverpage.md'
-var cover = read(file, 'utf8').toString()
-
-console.log('Replace version number in cover page...')
-cover = cover.replace(
- /(\S+)?<\/small>/g,
- '' + version + ''
-)
-write(file, cover)
diff --git a/build/mincss.js b/build/mincss.js
deleted file mode 100644
index f6c5ec2..0000000
--- a/build/mincss.js
+++ /dev/null
@@ -1,12 +0,0 @@
-const cssnano = require('cssnano').process
-const path = require('path')
-const fs = require('fs')
-
-files = fs.readdirSync(path.resolve('lib/themes'))
-
-files.forEach(file => {
- file = path.resolve('lib/themes', file)
- cssnano(fs.readFileSync(file)).then(result => {
- fs.writeFileSync(file, result.css)
- })
-})
diff --git a/build/release.sh b/build/release.sh
deleted file mode 100755
index a328322..0000000
--- a/build/release.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-set -e
-
-if [[ -z $1 ]]; then
- echo "Enter new version: "
- read VERSION
-else
- VERSION=$1
-fi
-
-read -p "Releasing $VERSION $RELEASE_TAG - are you sure? (y/n) " -n 1 -r
-echo
-if [[ $REPLY =~ ^[Yy]$ ]]; then
- echo "Releasing $VERSION ..."
-
- npm run test
-
- # build
- VERSION=$VERSION npm run build
-
- # update packages
- cd packages/docsify-server-renderer
- npm version $VERSION
- if [[ -z $RELEASE_TAG ]]; then
- npm publish
- else
- npm publish --tag $RELEASE_TAG
- fi
- cd -
-
- # commit
- git add -A
- git commit -m "[build] $VERSION $RELEASE_TAG"
- npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG"
-
- # changelog
- node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s
-
- git add .
- git commit -m "chore: add changelog $VERSION"
-
- # publish
- git tag v$VERSION
- git push origin refs/tags/v$VERSION
- git push
- if [[ -z $RELEASE_TAG ]]; then
- npm publish
- else
- npm publish --tag $RELEASE_TAG
- fi
-fi
diff --git a/build/ssr.js b/build/ssr.js
deleted file mode 100644
index 16b93ca..0000000
--- a/build/ssr.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var rollup = require('rollup')
-var buble = require('rollup-plugin-buble')
-var async = require('rollup-plugin-async')
-var replace = require('rollup-plugin-replace')
-
-rollup
- .rollup({
- input: 'packages/docsify-server-renderer/index.js',
- plugins: [
- async(),
- replace({
- __VERSION__: process.env.VERSION || require('../package.json').version,
- 'process.env.SSR': true
- }),
- buble({
- transforms: {
- generator: false
- }
- })
- ],
- onwarn: function () {}
- })
- .then(function (bundle) {
- var dest = 'packages/docsify-server-renderer/build.js'
-
- console.log(dest)
- bundle.write({
- format: 'cjs',
- file: dest
- })
- })
- .catch(function (err) {
- console.error(err)
- })
diff --git a/dev.html b/dev.html
new file mode 100644
index 0000000..d66b16d
--- /dev/null
+++ b/dev.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/README.md b/docs/README.md
index e625420..e28164f 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,32 +1,506 @@
-## docsify
+## Quick Start
+
+### Create a project
+First create a project, then create a `docs` folder
+```bash
+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
+
+```markdown
+# Title
+
+## blabla
+```
+
+### Deploy!
+Push code and activate **GitHub Pages** via your repo's settings
+
+
+## CLI
+
+Easy to setup and preview a docs.
+
+### Install
+```bash
+npm i docsify-cli -g
+```
+
+### Setup
+
+Setup a boilerplate docs
+```bash
+docsify init docs
+```
+
+### Preview
+Preview and serve your docs using
+```bash
+docsify serve docs
+```
+
+Read more [docsify-cli](https://github.com/QingWei-Li/docsify-cli)
+
+
+
+## More
+
+### Themes
+Currently available `vue.css` and `buble.css`
+```html
+
+
+```
+
+Minified files
+
+```html
+
+
+```
+
+### 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 with markdown. Create a `_coverpage.md` and set `data-coverpage` in the script tag.
+
+```markdown
+
+
+# docsify 1.2.0
> A magical documentation site generator.
-## What it is
-
-docsify generates your documentation website on the fly. Unlike GitBook, it does not generate static html files. Instead, it smartly loads and parses your Markdown files and displays them as a website. To start using it, all you need to do is create an `index.html` and [deploy it on GitHub Pages](deploy.md).
-
-See the [Quick start](quickstart.md) guide for more details.
-
-## Features
-
-- No statically built html files
-- Simple and lightweight (~21kB gzipped)
-- Smart full-text search plugin
+- Simple and lightweight (~12kb gzipped)
- Multiple themes
-- Useful plugin API
-- Emoji support
-- Compatible with IE11
-- Support server-side rendering ([example](https://github.com/docsifyjs/docsify-ssr-demo))
+- Not build static html files
-## Examples
-Check out the [Showcase](https://github.com/docsifyjs/awesome-docsify#showcase) to see docsify in use.
+[GitHub](https://github.com/QingWei-Li/docsify/)
+[Get Started](#quick-start)
+```
-## Donate
+#### Custom background
+Currently the background of the cover page is generated randomly. We can customize the background color, or add a background image.
-Please consider donating if you think docsify is helpful to you or that my work is valuable. I am happy if you can help me [buy a cup of coffee](https://github.com/QingWei-Li/donate). :heart:
+```markdown
+# docsify 1.2.0
+
+> xxx
+
+[GitHub](https://github.com/QingWei-Li/docsify/)
+[Get Started](#quick-start)
+
+
+
+
+
+```
+
+### Markdown parser
+
+Docsify uses [marked](https://github.com/chjj/marked) to parse markdown. We can configure it
+
+```js
+window.$docsify = {
+ markdown: {
+ smartypants: true
+ }
+}
+```
+
+And it can even be customized
+
+```js
+window.$docsify = {
+ markdown: function(marked) {
+ // ...
+
+ return marked
+ }
+}
+```
+
+### Doc Helpers
+#### p.tip
+
+`!> ` add your content will rendered as `
content
`
+
+```markdown
+!> Important **information**
+```
+
+It will be rendered
+
+```html
+
Important information
+```
+
+e.g.
+
+!> Important **information**
+
+
+#### p.warn
+
+```markdown
+?> todo info
+```
+
+?> todo info
+
+### Combining Vue
+We can write the Vue syntax directly in the markdown file, when the Vue library is loaded into `index.html`. Default will automatically initialize a Vue instance, of course, we can also manually.
+
+index.html
+```html
+
+
+```
+
+```markdown
+
+
{{ i }}
+
+```
+
+Manual initialization
+
+```markdown
+
+
+
Hello, {{ msg }}
+
+
+
+```
+
+## Options
+
+You can add configurations in the script tag attributes or with `window.$docsify`.
+
+### repo
+Display the [GitHub Corner](http://tholman.com/github-corners/) widget.
+
+```html
+
+```
+
+
+```js
+window.$docsify = {
+ repo: 'your/repo'
+}
+```
+
+### max-level
+TOC level.
+
+```html
+
+```
+
+```js
+window.$docsify = {
+ maxLevel: 6
+}
+```
+
+### el
+Root element.
+
+```html
+
+```
+
+```js
+window.$docsify = {
+ el: '#app'
+}
+```
+
+### sidebar-toggle
+
+Sidebar with toggle
+
+```html
+
+```
+
+```js
+window.$docsify = {
+ sidebarToggle: true
+}
+```
+
+### sidebar
+
+Custom sidebar. If it's set, the TOC will be disabled. Bind global variables on the `data-sidebar`.
+
+
+
+```html
+
+
+```
+
+
+```js
+window.$docsify = {
+ sidebar: 'sidebar'
+}
+```
+
+### load-sidebar
+
+Load sidebar markdown file. If it is configured, load the current directory `_sidebar.md` by default. If the file doesn't exist, the 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
+
+```
+
+```js
+window.$docsify = {
+ loadSidebar: '_sidebar.md'
+}
+```
+
+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)
+```
+
+### sub-max-level
+
+Display TOC in the custom sidebar. The default value is 0.
+
+
+```html
+
+```
+
+
+```js
+window.$docsify = {
+ maxSubLevel: 4
+}
+```
+
+### 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
+
+```
+
+```js
+window.$docsify = {
+ loadNavbar: '_navbar.md'
+}
+```
+
+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
+
+```
+
+```js
+window.$docsify = {
+ router: true
+}
+```
+
+
+### auto2top
+
+Scroll to the top on changing hash.
+
+
+```html
+
+
+
+```
+
+```js
+window.$docsify = {
+ auto2top: true,
+ // auto2top: 50
+}
+```
+
+### 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
+
+
+
+```
+
+
+```js
+window.$docsify = {
+ homepage: true
+}
+```
+
+
+### basePath
+
+If your HTML entry file and the markdown files are in different directories, we can use:
+
+```html
+
+
+
+
+```
+
+
+```js
+window.$docsify = {
+ basePath: '/base/'
+}
+```
+
+
+### coverpage
+
+Generate cover page.
+
+```html
+
+
+
+```
+
+```js
+window.$docsify = {
+ coverpage: true
+}
+```
+
+### name
+
+Project name. It is displayed in the sidebar.
+
+```html
+
+```
+
+```js
+window.$docsify = {
+ name: 'docsify'
+}
+```
+
+### nameLink
+
+Name link. The default value is `window.location.pathname`.
+
+
+```html
+
+```
+
+```js
+window.$docsify = {
+ nameLink: '/'
+}
+```
-## Community
-Users and the development team are usually in the [Gitter chat room](https://gitter.im/docsifyjs/Lobby).
diff --git a/docs/_coverpage.md b/docs/_coverpage.md
index 1decbd6..7663211 100644
--- a/docs/_coverpage.md
+++ b/docs/_coverpage.md
@@ -1,12 +1,14 @@

-# docsify 4.9.4
+# docsify 1.10.2
> A magical documentation site generator.
-- Simple and lightweight (~21kB gzipped)
-- No statically built html files
+- Simple and lightweight (~13kB gzipped)
+- Not build static html files
+- Support emoji :laughing:
- Multiple themes
-[GitHub](https://github.com/docsifyjs/docsify/)
-[Getting Started](#docsify)
+
+[GitHub](https://github.com/QingWei-Li/docsify/)
+[Get Started](#quick-start)
diff --git a/docs/_images/deploy-github-pages.png b/docs/_images/deploy-github-pages.png
deleted file mode 100644
index 278e40b..0000000
Binary files a/docs/_images/deploy-github-pages.png and /dev/null differ
diff --git a/docs/_images/nested-navbar.png b/docs/_images/nested-navbar.png
deleted file mode 100644
index 25f2341..0000000
Binary files a/docs/_images/nested-navbar.png and /dev/null differ
diff --git a/docs/_images/zh-cn/nested-navbar.png b/docs/_images/zh-cn/nested-navbar.png
deleted file mode 100644
index 0b2a1c9..0000000
Binary files a/docs/_images/zh-cn/nested-navbar.png and /dev/null differ
diff --git a/docs/_media/example.html b/docs/_media/example.html
deleted file mode 100644
index d35ee16..0000000
--- a/docs/_media/example.html
+++ /dev/null
@@ -1 +0,0 @@
-
To infinity and Beyond!
\ No newline at end of file
diff --git a/docs/_media/example.js b/docs/_media/example.js
deleted file mode 100644
index 7b6f668..0000000
--- a/docs/_media/example.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import fetch from 'fetch'
-
-const URL = 'https://example.com'
-const PORT = 8080
-
-/// [demo]
-const result = fetch(`${URL}:${PORT}`)
- .then(function(response) {
- return response.json();
- })
- .then(function(myJson) {
- console.log(JSON.stringify(myJson));
- });
-/// [demo]
-
-result.then(console.log).catch(console.error)
diff --git a/docs/_media/example.md b/docs/_media/example.md
deleted file mode 100644
index 6ee6494..0000000
--- a/docs/_media/example.md
+++ /dev/null
@@ -1 +0,0 @@
-> This is from the `example.md`
diff --git a/docs/_navbar.md b/docs/_navbar.md
deleted file mode 100644
index 47a2356..0000000
--- a/docs/_navbar.md
+++ /dev/null
@@ -1,6 +0,0 @@
-- Translations
- - [:uk: English](/)
- - [:cn: 中文](/zh-cn/)
- - [:de: Deutsch](/de-de/)
- - [:es: Spanish](/es/)
- - [:ru: Russian](/ru/)
diff --git a/docs/_sidebar.md b/docs/_sidebar.md
deleted file mode 100644
index 051514b..0000000
--- a/docs/_sidebar.md
+++ /dev/null
@@ -1,28 +0,0 @@
-- Getting started
-
- - [Quick start](quickstart.md)
- - [Writing more pages](more-pages.md)
- - [Custom navbar](custom-navbar.md)
- - [Cover page](cover.md)
-
-- Customization
-
- - [Configuration](configuration.md)
- - [Themes](themes.md)
- - [List of Plugins](plugins.md)
- - [Write a Plugin](write-a-plugin.md)
- - [Markdown configuration](markdown.md)
- - [Language highlighting](language-highlight.md)
-
-- Guide
-
- - [Deploy](deploy.md)
- - [Helpers](helpers.md)
- - [Vue compatibility](vue.md)
- - [CDN](cdn.md)
- - [Offline Mode(PWA)](pwa.md)
- - [Server-Side Rendering(SSR)](ssr.md)
- - [Embed Files](embed-files.md)
-
-- [Awesome docsify](awesome.md)
-- [Changelog](changelog.md)
diff --git a/docs/cdn.md b/docs/cdn.md
deleted file mode 100644
index eba77a8..0000000
--- a/docs/cdn.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# CDN
-
-Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon as it is published to npm. You can also browse the source of the npm package at [unpkg.com/docsify/](//unpkg.com/docsify/).
-
-## Latest version
-
-```html
-
-
-
-
-
-```
-
-Alternatively, use [compressed files](#compressed-file).
-
-## Specific version
-
-```html
-
-
-
-
-
-```
-
-## Compressed file
-
-```html
-
-
-
-
-
-```
-
-```html
-
-
-
-
-
-```
-
-## Other CDN
-
-- http://www.bootcdn.cn/docsify
-- https://cdn.jsdelivr.net/npm/docsify/
-- https://cdnjs.com/libraries/docsify
-
diff --git a/docs/configuration.md b/docs/configuration.md
deleted file mode 100644
index ba48475..0000000
--- a/docs/configuration.md
+++ /dev/null
@@ -1,518 +0,0 @@
-# Configuration
-
-You can configure the `window.$docsify`.
-
-```html
-
-```
-
-## el
-
-- Type: `String`
-- Default: `#app`
-
-The DOM element to be mounted on initialization. It can be a CSS selector string or an actual HTMLElement.
-
-```js
-window.$docsify = {
- el: '#app'
-};
-```
-
-## repo
-
-- Type: `String`
-- Default: `null`
-
-Configure the repository url or a string of `username/repo` can add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.
-
-```js
-window.$docsify = {
- repo: 'docsifyjs/docsify',
- // or
- repo: 'https://github.com/docsifyjs/docsify/'
-};
-```
-
-## maxLevel
-
-- Type: `Number`
-- Default: `6`
-
-Maximum Table of content level.
-
-```js
-window.$docsify = {
- maxLevel: 4
-};
-```
-
-## loadNavbar
-
-- Type: `Boolean|String`
-- Default: `false`
-
-Loads navbar from the Markdown file `_navbar.md` if **true**, or else from the path specified.
-
-```js
-window.$docsify = {
- // load from _navbar.md
- loadNavbar: true,
-
- // load from nav.md
- loadNavbar: 'nav.md'
-};
-```
-
-## loadSidebar
-
-- Type: `Boolean|String`
-- Default: `false`
-
-Loads sidebar from the Markdown file `_sidebar.md` if **true**, or else from the path specified.
-
-```js
-window.$docsify = {
- // load from _sidebar.md
- loadSidebar: true,
-
- // load from summary.md
- loadSidebar: 'summary.md'
-};
-```
-
-## subMaxLevel
-
-- Type: `Number`
-- Default: `0`
-
-Add table of contents (TOC) in custom sidebar.
-
-```js
-window.$docsify = {
- subMaxLevel: 2
-};
-```
-
-## auto2top
-
-- Type: `Boolean`
-- Default: `false`
-
-Scrolls to the top of the screen when the route is changed.
-
-```js
-window.$docsify = {
- auto2top: true
-};
-```
-
-## homepage
-
-- Type: `String`
-- Default: `README.md`
-
-`README.md` in your docs folder will be treated as homepage for your website, but sometimes you may need to serve another file as your homepage.
-
-```js
-window.$docsify = {
- // Change to /home.md
- homepage: 'home.md',
-
- // Or use the readme in your repo
- homepage:
- 'https://raw.githubusercontent.com/docsifyjs/docsify/master/README.md'
-};
-```
-
-## basePath
-
-- Type: `String`
-
-Base path of the website. You can set it to another directory or another domain name.
-
-```js
-window.$docsify = {
- basePath: '/path/',
-
- // Load the files from another site
- basePath: 'https://docsify.js.org/',
-
- // Even can load files from other repo
- basePath:
- 'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/'
-};
-```
-
-## relativePath
-
-- Type: `Boolean`
-- Default: `false`
-
-If **true** links are relative to the current context.
-
-For example, the directory structure is as follows:
-
-```text
-.
-└── docs
- ├── README.md
- ├── guide.md
- └── zh-cn
- ├── README.md
- ├── guide.md
- └── config
- └── example.md
-```
-
-With relative path **enabled** and current URL `http://domain.com/zh-cn/README`, given links will resolve to:
-
-```text
-guide.md => http://domain.com/zh-cn/guide
-config/example.md => http://domain.com/zh-cn/config/example
-../README.md => http://domain.com/README
-/README.md => http://domain.com/README
-```
-
-```js
-window.$docsify = {
- // Relative path enabled
- relativePath: true,
-
- // Relative path disabled (default value)
- relativePath: false
-};
-```
-
-## coverpage
-
-- Type: `Boolean|String|String[]|Object`
-- Default: `false`
-
-Activate the [cover feature](cover.md). If true, it will load from `_coverpage.md`.
-
-```js
-window.$docsify = {
- coverpage: true,
-
- // Custom file name
- coverpage: 'cover.md',
-
- // mutiple covers
- coverpage: ['/', '/zh-cn/'],
-
- // mutiple covers and custom file name
- coverpage: {
- '/': 'cover.md',
- '/zh-cn/': 'cover.md'
- }
-};
-```
-
-## logo
-
-- Type: `String`
-
-Website logo as it appears in the sidebar, you can resize by CSS.
-
-```js
-window.$docsify = {
- logo: '/_media/icon.svg'
-};
-```
-
-## name
-
-- Type: `String`
-
-Website name as it appears in the sidebar.
-
-```js
-window.$docsify = {
- name: 'docsify'
-};
-```
-
-## nameLink
-
-- Type: `String`
-- Default: `window.location.pathname`
-
-The name of the link.
-
-```js
-window.$docsify = {
- nameLink: '/',
-
- // For each route
- nameLink: {
- '/zh-cn/': '/zh-cn/',
- '/': '/'
- }
-};
-```
-
-## markdown
-
-- Type: `Function`
-
-See [Markdown configuration](markdown.md).
-
-```js
-window.$docsify = {
- // object
- markdown: {
- smartypants: true,
- renderer: {
- link: function() {
- // ...
- }
- }
- },
-
- // function
- markdown: function(marked, renderer) {
- // ...
- return marked;
- }
-};
-```
-
-## themeColor
-
-- Type: `String`
-
-Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) feature and polyfill in old browser.
-
-```js
-window.$docsify = {
- themeColor: '#3F51B5'
-};
-```
-
-## alias
-
-- Type: `Object`
-
-Set the route alias. You can freely manage routing rules. Supports RegExp.
-
-```js
-window.$docsify = {
- alias: {
- '/foo/(+*)': '/bar/$1', // supports regexp
- '/zh-cn/changelog': '/changelog',
- '/changelog':
- 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG',
- '/.*/_sidebar.md': '/_sidebar.md' // See #301
- }
-};
-```
-
-## autoHeader
-
-- type: `Boolean`
-
-If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.md`, prepend a header to the page before converting it to html. Compare [#78](https://github.com/docsifyjs/docsify/issues/78).
-
-```js
-window.$docsify = {
- loadSidebar: true,
- autoHeader: true
-};
-```
-
-## executeScript
-
-- type: `Boolean`
-
-Execute the script on the page. Only parse the first script tag([demo](themes)). If Vue is present, it is turned on by default.
-
-```js
-window.$docsify = {
- executeScript: true
-};
-```
-
-```markdown
-## This is test
-
-
-```
-
-Note that if you are running an external script, e.g. an embedded jsfiddle demo, make sure to include the [external-script](plugins.md?id=external-script) plugin.
-
-## noEmoji
-
-- type: `Boolean`
-
-Disabled emoji parse.
-
-```js
-window.$docsify = {
- noEmoji: true
-};
-```
-
-## mergeNavbar
-
-- type: `Boolean`
-
-Navbar will be merged with the sidebar on smaller screens.
-
-```js
-window.$docsify = {
- mergeNavbar: true
-};
-```
-
-## formatUpdated
-
-- type: `String|Function`
-
-We can display the file update date through **{docsify-updated}** variable. And format it by `formatUpdated`.
-See https://github.com/lukeed/tinydate#patterns
-
-```js
-window.$docsify = {
- formatUpdated: '{MM}/{DD} {HH}:{mm}',
-
- formatUpdated: function(time) {
- // ...
-
- return time;
- }
-};
-```
-
-## externalLinkTarget
-
-- type: `String`
-- default: `_blank`
-
-Target to open external links. Default `'_blank'` (new window/tab)
-
-```js
-window.$docsify = {
- externalLinkTarget: '_self' // default: '_blank'
-};
-```
-
-## routerMode
-
-- type: `String`
-- default: `hash`
-
-```js
-window.$docsify = {
- routerMode: 'history' // default: 'hash'
-};
-```
-
-## noCompileLinks
-
-- type: `Array`
-
-Sometimes we do not want docsify to handle our links. See [#203](https://github.com/docsifyjs/docsify/issues/203)
-
-```js
-window.$docsify = {
- noCompileLinks: ['/foo', '/bar/.*']
-};
-```
-
-## onlyCover
-
-- type: `Boolean`
-
-Only coverpage is loaded when visiting the home page.
-
-```js
-window.$docsify = {
- onlyCover: false
-};
-```
-
-## requestHeaders
-
-- type: `Object`
-
-Set the request resource headers.
-
-```js
-window.$docsify = {
- requestHeaders: {
- 'x-token': 'xxx'
- }
-};
-```
-
-## ext
-
-- type: `String`
-
-Request file extension.
-
-```js
-window.$docsify = {
- ext: '.md'
-};
-```
-
-## fallbackLanguages
-
-- type: `Array`
-
-List of languages that will fallback to the default language when a page is request and didn't exists for the given local.
-
-Example:
-
-- try to fetch the page of `/de/overview`. If this page exists, it'll be displayed
-- then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed
-- then display 404 page.
-
-```js
-window.$docsify = {
- fallbackLanguages: ['fr', 'de']
-};
-```
-
-## notFoundPage
-
-- type: `Boolean` | `String` | `Object`
-
-Load the `_404.md` file:
-
-```js
-window.$docsify = {
- notFoundPage: true
-};
-```
-
-Load the customised path of the 404 page:
-
-```js
-window.$docsify = {
- notFoundPage: 'my404.md'
-};
-```
-
-Load the right 404 page according to the localisation:
-
-```js
-window.$docsify = {
- notFoundPage: {
- '/': '_404.md',
- '/de': 'de/_404.md'
- }
-};
-```
-
-> Note: The options with fallbackLanguages didn't work with the `notFoundPage` options.
diff --git a/docs/cover.md b/docs/cover.md
deleted file mode 100644
index 555f4ff..0000000
--- a/docs/cover.md
+++ /dev/null
@@ -1,99 +0,0 @@
-# Cover
-
-Activate the cover feature by setting `coverpage` to **true**, compare [coverpage configuration](configuration.md#coverpage).
-
-## Basic usage
-
-Set `coverpage` to **true**, and create a `_coverpage.md`:
-
-```html
-
-
-
-
-```
-
-```markdown
-
-
-
-
-# docsify 3.5
-
-> A magical documentation site generator.
-
-- Simple and lightweight (~21kB gzipped)
-- No statically built html files
-- Multiple themes
-
-[GitHub](https://github.com/docsifyjs/docsify/)
-[Get Started](#docsify)
-```
-
-!> A document site can have only one coverpage!
-
-## Custom background
-
-The background color is generated randomly by default. You can customize the background color or a background image:
-
-```markdown
-
-
-# docsify 3.5
-
-[GitHub](https://github.com/docsifyjs/docsify/)
-[Get Started](#quick-start)
-
-
-
-
-
-
-
-
-```
-
-## Coverpage as homepage
-
-Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [onlyCover option](configuration.md#onlycover).
-
-## Multiple covers
-
-If your docs site is in more than one language, it may be useful to set multiple covers.
-
-For example, your docs structure is like this
-
-```text
-.
-└── docs
- ├── README.md
- ├── guide.md
- ├── _coverpage.md
- └── zh-cn
- ├── README.md
- └── guide.md
- └── _coverpage.md
-```
-
-Now, you can set
-
-```js
-window.$docsify = {
- coverpage: ['/', '/zh-cn/']
-};
-```
-
-Or a special file name
-
-```js
-window.$docsify = {
- coverpage: {
- '/': 'cover.md',
- '/zh-cn/': 'cover.md'
- }
-};
-```
diff --git a/docs/custom-navbar.md b/docs/custom-navbar.md
deleted file mode 100644
index 324ad81..0000000
--- a/docs/custom-navbar.md
+++ /dev/null
@@ -1,96 +0,0 @@
-# Custom navbar
-
-## HTML
-
-If you need custom navigation, you can create a HTML-based navigation bar.
-
-!> Note that documentation links begin with `#/`.
-
-```html
-
-
-
-
-
-
-```
-
-## Markdown
-
-Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`, compare [loadNavbar configuration](configuration.md#loadnavbar).
-
-```html
-
-
-
-
-```
-
-```markdown
-
-
-* [En](/)
-* [chinese](/zh-cn/)
-```
-
-!> You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
-
-`_navbar.md` is loaded from each level directory. If the current directory doesn't have `_navbar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_navbar.md` will be loaded from `/guide/_navbar.md`.
-
-## Nesting
-
-You can create sub-lists by indenting items that are under a certain parent.
-
-```markdown
-
-
-* Getting started
-
- * [Quick start](quickstart.md)
- * [Writing more pages](more-pages.md)
- * [Custom navbar](custom-navbar.md)
- * [Cover page](cover.md)
-
-* Configuration
- * [Configuration](configuration.md)
- * [Themes](themes.md)
- * [Using plugins](plugins.md)
- * [Markdown configuration](markdown.md)
- * [Language highlight](language-highlight.md)
-```
-
-renders as
-
-
-
-## Combining custom navbars with the emoji plugin
-
-If you use the [emoji plugin](plugins#emoji):
-
-```html
-
-
-
-
-
-```
-
-you could, for example, use flag emojis in your custom navbar Markdown file:
-
-```markdown
-
-
-* [:us:, :uk:](/)
-* [:cn:](/zh-cn/)
-```
diff --git a/docs/deploy.md b/docs/deploy.md
deleted file mode 100644
index a879f2e..0000000
--- a/docs/deploy.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# Deploy
-
-Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pages, GitLab Pages or VPS.
-
-## GitHub Pages
-
-There're three places to populate your docs for your Github repository:
-
-- `docs/` folder
-- master branch
-- gh-pages branch
-
-It is recommended that you save your files to the `./docs` subfolder of the `master` branch of your repository. Then select `master branch /docs folder` as your Github Pages source in your repositories' settings page.
-
-
-
-!> You can also save files in the root directory and select `master branch`.
-You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch)
-
-## GitLab Pages
-
-If you are deploying your master branch, include `.gitlab-ci.yml` with the following script:
-
-?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop.
-
-```YAML
-pages:
- stage: deploy
- script:
- - mkdir .public
- - cp -r * .public
- - mv .public public
- artifacts:
- paths:
- - public
- only:
- - master
-```
-
-!> You can replace script with `- cp -r docs/. public`, if `./docs` is your Docsify subfolder.
-
-## Firebase Hosting
-
-!> You'll need to install the Firebase CLI using `npm i -g firebase-tools` after signing into the [Firebase Console](https://console.firebase.google.com) using a Google Account.
-
-Using Terminal determine and navigate to the directory for your Firebase Project - this could be `~/Projects/Docs` etc. From there, run `firebase init`, choosing `Hosting` from the menu (use **space** to select, **arrow keys** to change options and **enter** to confirm). Follow the setup instructions.
-
-You should have your `firebase.json` file looking similar to this (I changed the deployment directory from `public` to `site`):
-
-```json
-{
- "hosting": {
- "public": "site",
- "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
- }
-}
-```
-
-Once finished, build the starting template by running `docsify init ./site` (replacing site with the deployment directory you determined when running `firebase init` - public by default). Add/edit the documentation, then run `firebase deploy` from the base project directory.
-
-## VPS
-
-Try following nginx config.
-
-```nginx
-server {
- listen 80;
- server_name your.domain.com;
-
- location / {
- alias /path/to/dir/of/docs/;
- index index.html;
- }
-}
-```
-
-## Netlify
-
-1. Login to your [Netlify](https://www.netlify.com/) account.
-2. In the [dashboard](https://app.netlify.com/) page, click **New site from Git**.
-3. Choose a repository where you store your docs, leave the **Build Command** area blank, fill in the Publish directory area with the directory of your `index.html`, for example it should be docs if you populated it at `docs/index.html`.
-
-### HTML5 router
-
-When using the HTML5 router, you need to set up redirect rules that redirect all requests to your `index.html`, it's pretty simple when you're using Netlify, populate a `\redirects` file in the docs directory and you're all set:
-
-```sh
-/* /index.html 200
-```
-
-## AWS Amplify
-
-1. Set the routerMode in the Docsify project `index.html` to *history* mode.
-
-```html
-
-```
-
-2. Login to your [AWS Console](https://aws.amazon.com).
-3. Go to the [AWS Amplify Dashboard](https://aws.amazon.com/amplify).
-4. Choose the **Deploy** route to setup your project.
-5. When prompted, keep the build settings empty if you're serving your docs within the root directory. If you're serving your docs from a different directory, customise your amplify.yml
-
-```yml
-version: 0.1
-frontend:
- phases:
- build:
- commands:
- - echo "Nothing to build"
- artifacts:
- baseDirectory: /docs
- files:
- - '**/*'
- cache:
- paths: []
-
-```
-
-6. Add the following Redirect rules in their displayed order.
-
-| Source address | Target address | Type |
-|----------------|----------------|---------------|
-| /<*>.md | /<*>.md | 200 (Rewrite) |
-| /<*> | /index.html | 200 (Rewrite) |
-
diff --git a/docs/embed-files.md b/docs/embed-files.md
deleted file mode 100644
index dab2efe..0000000
--- a/docs/embed-files.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Embed files
-
-With docsify 4.6 it is now possible to embed any type of file.
-You can embed these files as video, audio, iframes, or code blocks, and even Markdown files can even be embedded directly into the document.
-
-For example, here embedded a Markdown file. You only need to do this:
-
-```markdown
-[filename](_media/example.md ':include')
-```
-
-Then the content of `example.md` will be displayed directly here
-
-[filename](_media/example.md ':include')
-
-You can check the original content for [example.md](_media/example.md ':ignore').
-
-Normally, this will compiled into a link, but in docsify, if you add `:include` it will be embedded.
-
-## Embedded file type
-
-Currently, file extension are automatically recognized and embedded in different ways.
-
-This is a supported embedding type:
-
-* **iframe** `.html`, `.htm`
-* **markdown** `.markdown`, `.md`
-* **audio** `.mp3`
-* **video** `.mp4`, `.ogg`
-* **code** other file extension
-
-Of course, you can force the specified. For example, you want to Markdown file as code block embedded.
-
-```markdown
-[filename](_media/example.md ':include :type=code')
-```
-
-You will get it
-
-[filename](_media/example.md ':include :type=code')
-
-## Embedded code fragments
-Sometimes you don't want to embed a whole file. Maybe because you need just a few lines but you want to compile and test the file in CI.
-
-```markdown
-[filename](_media/example.js ':include :type=code :fragment=demo')
-```
-
-In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
-Alternatively you can use `### [demo]`.
-
-Example:
-
-[filename](_media/example.js ':include :type=code :fragment=demo')
-
-
-## Tag attribute
-
-If you embed the file as `iframe`, `audio` and `video`, then you may need to set the attributes of these tags.
-
-```markdown
-[cinwell website](https://cinwell.com ':include :type=iframe width=100% height=400px')
-```
-
-[cinwell website](https://cinwell.com ':include :type=iframe width=100% height=400px')
-
-Did you see it? You only need to write directly. You can check [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) for these attributes.
-
-## The code block highlight
-
-Embedding any type of source code file, you can specify the highlighted language or automatically identify.
-
-```markdown
-[](_media/example.html ':include :type=code text')
-```
-
-⬇️
-
-[](_media/example.html ':include :type=code text')
-
-?> How to set highlight? You can see [here](language-highlight.md).
diff --git a/docs/_media/favicon.ico b/docs/favicon.ico
similarity index 100%
rename from docs/_media/favicon.ico
rename to docs/favicon.ico
diff --git a/docs/helpers.md b/docs/helpers.md
deleted file mode 100644
index b047d36..0000000
--- a/docs/helpers.md
+++ /dev/null
@@ -1,145 +0,0 @@
-# Doc helper
-
-docsify extends Markdown syntax to make your documents more readable.
-
-## important content
-
-Important content like:
-
-```markdown
-!> **Time** is money, my friend!
-```
-
-is rendered as:
-
-!> **Time** is money, my friend!
-
-## General tips
-
-General tips like:
-
-```markdown
-?> _TODO_ unit test
-```
-
-are rendered as:
-
-?> _TODO_ unit test
-
-## Ignore to compile link
-
-Some time we will put some other relative path to the link, you have to need to tell docsify you don't need to compile this link. For example
-
-```md
-[link](/demo/)
-```
-
-It will be compiled to `link` and will be loaded `/demo/README.md`. Maybe you want to jump to `/demo/index.html`.
-
-Now you can do that
-
-```md
-[link](/demo/ ':ignore')
-```
-
-You will get `link`html. Do not worry, you can still set title for link.
-
-```md
-[link](/demo/ ':ignore title')
-
-link
-```
-
-## Set target attribute for link
-
-```md
-[link](/demo ':target=_blank')
-[link](/demo2 ':target=_self')
-```
-
-## Disable link
-
-```md
-[link](/demo ':disabled')
-```
-
-## Github Task Lists
-
-```md
-- [ ] foo
-- bar
-- [x] baz
-- [] bam <~ not working
- - [ ] bim
- - [ ] lim
-```
-
-- [ ] foo
-- bar
-- [x] baz
-- [] bam <~ not working
- - [ ] bim
- - [ ] lim
-
-## Image resizing
-
-```md
-
-
-
-
-
-
-```
-
-
-
-
-
-## Customise ID for headings
-
-```md
-### 你好,世界! :id=hello-world
-```
-
-## Markdown in html tag
-
-You need to insert a space between the html and markdown content.
-This is useful for rendering markdown content in the details element.
-
-```markdown
-
-Self-assessment (Click to expand)
-
-- Abc
-- Abc
-
-
-```
-
-
-Self-assessment (Click to expand)
-
-- Abc
-- Abc
-
-
-
-Or markdown content can be wrapped in html tag.
-
-```markdown
-
"
- );
- }
- return this.origin.code.apply(this, arguments);
- }
- }
- }
-}
-```
diff --git a/docs/more-pages.md b/docs/more-pages.md
deleted file mode 100644
index 46e7df8..0000000
--- a/docs/more-pages.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# More pages
-
-If you need more pages, you can simply create more markdown files in your docsify directory. If you create a file named `guide.md`, then it is accessible via `/#/guide`.
-
-For example, the directory structure is as follows:
-
-```text
-.
-└── docs
- ├── README.md
- ├── guide.md
- └── zh-cn
- ├── README.md
- └── guide.md
-```
-
-Matching routes
-
-```text
-docs/README.md => http://domain.com
-docs/guide.md => http://domain.com/guide
-docs/zh-cn/README.md => http://domain.com/zh-cn/
-docs/zh-cn/guide.md => http://domain.com/zh-cn/guide
-```
-
-## Sidebar
-
-In order to have sidebar, then you can create your own `_sidebar.md` (see [this documentation's sidebar](https://github.com/docsifyjs/docsify/blob/master/docs/_sidebar.md) for an example):
-
-First, you need to set `loadSidebar` to **true**. Details are available in the [configuration paragraph](configuration.md#loadsidebar).
-
-```html
-
-
-
-
-```
-
-Create the `_sidebar.md`:
-
-```markdown
-
-
-* [Home](/)
-* [Guide](guide.md)
-```
-
-You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
-
-## Nested Sidebars
-
-You may want the sidebar to update with only navigation to reflect the current directory. This can be done by adding a `_sidebar.md` file to each folder.
-
-`_sidebar.md` is loaded from each level directory. If the current directory doesn't have `_sidebar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_sidebar.md` will be loaded from `/guide/_sidebar.md`.
-
-You can specify `alias` to avoid unnecessary fallback.
-
-```html
-
-```
-
-!> You can create a `README.md` file in a subdirectory to use it as the landing page for the route.
-
-## Set Page Titles from Sidebar Selection
-
-A page's `title` tag is generated from the _selected_ sidebar item name. For better SEO, you can customize the title by specifying a string after the filename.
-
-```markdown
-
-* [Home](/)
-* [Guide](guide.md "The greatest guide in the world")
-```
-
-## Table of Contents
-
-Once you've created `_sidebar.md`, the sidebar content is automatically generated based on the headers in the markdown files.
-
-A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`, compare [subMaxLevel configuration](configuration.md#submaxlevel).
-
-```html
-
-
-
-
-```
-
-## Ignoring Subheaders
-
-When `subMaxLevel` is set, each header is automatically added to the table of contents by default. If you want to ignore a specific header, add `{docsify-ignore}` to it.
-
-```markdown
-# Getting Started
-
-## Header {docsify-ignore}
-
-This header won't appear in the sidebar table of contents.
-```
-
-To ignore all headers on a specific page, you can use `{docsify-ignore-all}` on the first header of the page.
-
-```markdown
-# Getting Started {docsify-ignore-all}
-
-## Header
-
-This header won't appear in the sidebar table of contents.
-```
-
-Both `{docsify-ignore}` and `{docsify-ignore-all}` will not be rendered on the page when used.
diff --git a/docs/plugins.md b/docs/plugins.md
deleted file mode 100644
index 3706b89..0000000
--- a/docs/plugins.md
+++ /dev/null
@@ -1,197 +0,0 @@
-# List of Plugins
-
-## Full text search
-
-By default, the hyperlink on the current page is recognized and the content is saved in `localStorage`. You can also specify the path to the files.
-
-```html
-
-
-
-```
-
-## Google Analytics
-
-Install the plugin and configure the track id.
-
-```html
-
-
-
-```
-
-Configure by `data-ga`.
-
-```html
-
-
-```
-
-## emoji
-
-The default is to support parsing emoji. For example `:100:` will be parsed to :100:. But it is not precise because there is no matching non-emoji string. If you need to correctly parse the emoji string, you need install this plugin.
-
-```html
-
-```
-
-## External Script
-
-If the script on the page is an external one (imports a js file via `src` attribute), you'll need this plugin to make it work.
-
-```html
-
-```
-
-## Zoom image
-
-Medium's image zoom. Based on [medium-zoom](https://github.com/francoischalifour/medium-zoom).
-
-```html
-
-```
-
-Exclude the special image
-
-```markdown
-
-```
-
-## Edit on github
-
-Add `Edit on github` button on every pages. Provided by [@njleonzhang](https://github.com/njleonzhang), check [document](https://github.com/njleonzhang/docsify-edit-on-github)
-
-## Demo code with instant preview and jsfiddle integration
-
-With this plugin, sample code can be rendered on the page instantly, so that the readers can see the preview immediately.
-When readers expand the demo box, the source code and description are shown there. if they click the button `Try in Jsfiddle`,
-`jsfiddle.net` will be open with the code of this sample, which allow readers to revise the code and try on their own.
-
-[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
-
-## Copy to Clipboard
-
-Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
-
-```html
-
-```
-
-See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
-
-## Disqus
-
-Disqus comments. https://disqus.com/
-
-```html
-
-
-```
-
-## Gitalk
-
-[Gitalk](https://github.com/gitalk/gitalk) is a modern comment component based on Github Issue and Preact.
-
-```html
-
-
-
-
-
-```
-
-## Pagination
-
-Pagination for docsify. By [@imyelo](https://github.com/imyelo)
-
-```html
-
-
-```
-
-## codefund
-
-a [plugin](https://github.com/njleonzhang/docsify-plugin-codefund) to make it easy to join up [codefund](https://codefund.io/)
-
-> codefund is formerly known as "codesponsor"
-
-```
-
-
-window.$docsify = {
- plugins: [
- DocsifyCodefund.create('xxxx-xxx-xxx') // change to your codefund id
- ]
-}
-```
-
-## Tabs
-
-A docsify.js plugin for displaying tabbed content from markdown.
-
-- [Documentation & Demos](https://jhildenbiddle.github.io/docsify-tabs)
-
-Provided by [@jhildenbiddle](https://github.com/jhildenbiddle/docsify-tabs).
-
-## More plugins
-
-See [awesome-docsify](awesome?id=plugins)
diff --git a/docs/pwa.md b/docs/pwa.md
deleted file mode 100644
index e8d1c74..0000000
--- a/docs/pwa.md
+++ /dev/null
@@ -1,115 +0,0 @@
-# Offline Mode
-
-[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) (PWA) are experiences that combine the best of the web with the best of apps. We can enhance our website with service workers to work **offline** or on low-quality networks.
-
-It is also very easy to use it.
-
-## Create serviceWorker
-
-Create a `sw.js` file in your documents root directory and copy the following code:
-
-*sw.js*
-
-```js
-/* ===========================================================
- * docsify sw.js
- * ===========================================================
- * Copyright 2016 @huxpro
- * Licensed under Apache 2.0
- * Register service worker.
- * ========================================================== */
-
-const RUNTIME = 'docsify'
-const HOSTNAME_WHITELIST = [
- self.location.hostname,
- 'fonts.gstatic.com',
- 'fonts.googleapis.com',
- 'unpkg.com'
-]
-
-// The Util Function to hack URLs of intercepted requests
-const getFixedUrl = (req) => {
- var now = Date.now()
- var url = new URL(req.url)
-
- // 1. fixed http URL
- // Just keep syncing with location.protocol
- // fetch(httpURL) belongs to active mixed content.
- // And fetch(httpRequest) is not supported yet.
- url.protocol = self.location.protocol
-
- // 2. add query for caching-busting.
- // Github Pages served with Cache-Control: max-age=600
- // max-age on mutable content is error-prone, with SW life of bugs can even extend.
- // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string.
- // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190
- if (url.hostname === self.location.hostname) {
- url.search += (url.search ? '&' : '?') + 'cache-bust=' + now
- }
- return url.href
-}
-
-/**
- * @Lifecycle Activate
- * New one activated when old isnt being used.
- *
- * waitUntil(): activating ====> activated
- */
-self.addEventListener('activate', event => {
- event.waitUntil(self.clients.claim())
-})
-
-/**
- * @Functional Fetch
- * All network requests are being intercepted here.
- *
- * void respondWith(Promise r)
- */
-self.addEventListener('fetch', event => {
- // Skip some of cross-origin requests, like those for Google Analytics.
- if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) {
- // Stale-while-revalidate
- // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale
- // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1
- const cached = caches.match(event.request)
- const fixedUrl = getFixedUrl(event.request)
- const fetched = fetch(fixedUrl, { cache: 'no-store' })
- const fetchedCopy = fetched.then(resp => resp.clone())
-
- // Call respondWith() with whatever we get first.
- // If the fetch fails (e.g disconnected), wait for the cache.
- // If there’s nothing in cache, wait for the fetch.
- // If neither yields a response, return offline pages.
- event.respondWith(
- Promise.race([fetched.catch(_ => cached), cached])
- .then(resp => resp || fetched)
- .catch(_ => { /* eat any errors */ })
- )
-
- // Update the cache with the version we fetched (only for ok status)
- event.waitUntil(
- Promise.all([fetchedCopy, caches.open(RUNTIME)])
- .then(([response, cache]) => response.ok && cache.put(event.request, response))
- .catch(_ => { /* eat any errors */ })
- )
- }
-})
-```
-
-## Register
-
-Now, register it in your `index.html`. It only works on some modern browsers, so we need to judge:
-
-*index.html*
-
-```html
-
-```
-
-## Enjoy it
-
-Release your website and start experiencing magical offline feature. :ghost: You can turn off Wi-Fi and refresh the current site to experience it.
diff --git a/docs/quickstart.md b/docs/quickstart.md
deleted file mode 100644
index 08666d2..0000000
--- a/docs/quickstart.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# Quick start
-
-It is recommended to install `docsify-cli` globally, which helps initializing and previewing the website locally.
-
-```bash
-npm i docsify-cli -g
-```
-
-## Initialize
-
-If you want to write the documentation in the `./docs` subdirectory, you can use the `init` command.
-
-```bash
-docsify init ./docs
-```
-
-## Writing content
-
-After the `init` is complete, you can see the file list in the `./docs` subdirectory.
-
-* `index.html` as the entry file
-* `README.md` as the home page
-* `.nojekyll` prevents GitHub Pages from ignoring files that begin with an underscore
-
-You can easily update the documentation in `./docs/README.md`, of course you can add [more pages](more-pages.md).
-
-## Preview your site
-
-Run the local server with `docsify serve`. You can preview your site in your browser on `http://localhost:3000`.
-
-```bash
-docsify serve docs
-```
-
-?> For more use cases of `docsify-cli`, head over to the [docsify-cli documentation](https://github.com/docsifyjs/docsify-cli).
-
-## Manual initialization
-
-If you don't like `npm` or have trouble installing the tool, you can manually create `index.html`:
-
-```html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-If you installed python on your system, you can easily use it to run a static server to preview your site.
-
-```bash
-cd docs && python -m SimpleHTTPServer 3000
-```
-
-## Loading dialog
-
-If you want, you can show a loading dialog before docsify starts to render your documentation:
-
-```html
-
-
-
Please wait...
-```
-
-You should set the `data-app` attribute if you changed `el`:
-
-```html
-
-
-
Please wait...
-
-
-```
-
-Compare [el configuration](configuration.md#el).
diff --git a/docs/ssr.md b/docs/ssr.md
deleted file mode 100644
index e9c435f..0000000
--- a/docs/ssr.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# Server-Side Rendering
-
-See https://docsify.now.sh
-
-Repo in https://github.com/docsifyjs/docsify-ssr-demo
-
-## Why SSR?
-- Better SEO
-- Feeling cool
-
-## Quick start
-
-Install `now` and `docsify-cli` in your project.
-
-```bash
-npm i now docsify-cli -D
-```
-
-Edit `package.json`. If the documentation in `./docs` subdirectory.
-
-```json
-{
- "name": "my-project",
- "scripts": {
- "start": "docsify start . -c ssr.config.js",
- "deploy": "now -p"
- },
- "files": [
- "docs"
- ],
- "docsify": {
- "config": {
- "basePath": "https://docsify.js.org/",
- "loadSidebar": true,
- "loadNavbar": true,
- "coverpage": true,
- "name": "docsify"
- }
- }
-}
-```
-
-!> The `basePath` just like webpack `publicPath`. We can use local or remote files.
-
-We can preview in the local to see if it works.
-
-```bash
-npm start
-
-# open http://localhost:4000
-```
-
-Publish it!
-
-```bash
-now -p
-```
-
-Now, You have a support for SSR the docs site.
-
-## Custom template
-
-You can provide a template for entire page's HTML. such as
-
-```html
-
-
-
-
- docsify
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-The template should contain these comments for rendered app content.
- - ``
- - ``
-
-## Configuration
-
-You can configure it in a special config file, or `package.json`.
-
-```js
-module.exports = {
- template: './ssr.html',
- maxAge: 60 * 60 * 1000, // lru-cache config
- config: {
- // docsify config
- }
-}
-```
-
-## Deploy for your VPS
-
-You can run `docsify start` directly on your Node server, or write your own server app with `docsify-server-renderer`.
-
-```js
-var Renderer = require('docsify-server-renderer')
-var readFileSync = require('fs').readFileSync
-
-// init
-var renderer = new Renderer({
- template: readFileSync('./docs/index.template.html', 'utf-8'),
- config: {
- name: 'docsify',
- repo: 'docsifyjs/docsify'
- }
-})
-
-renderer.renderToString(url)
- .then(html => {})
- .catch(err => {})
-```
diff --git a/docs/themes.md b/docs/themes.md
deleted file mode 100644
index 1de9125..0000000
--- a/docs/themes.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Themes
-
-There are currently three themes available. Copy [Vue](//vuejs.org) and [buble](//buble.surge.sh) website custom theme and [@liril-net](https://github.com/liril-net) contribution to the theme of the black style.
-
-```html
-
-
-
-
-```
-
-!> Compressed files are available in `/lib/themes/`.
-
-```html
-
-
-
-
-
-
-```
-
-If you have any ideas or would like to develop a new theme, you are welcome to submit a [pull request](https://github.com/docsifyjs/docsify/pulls).
-
-#### Click to preview
-
-
-
-
-
-
-
-## Other themes
-
-- [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/#/) A delightfully simple theme system for docsify.
diff --git a/docs/vue.md b/docs/vue.md
deleted file mode 100644
index a1b5683..0000000
--- a/docs/vue.md
+++ /dev/null
@@ -1,99 +0,0 @@
-# Compatible with Vue
-
-You can write Vue components directly in the Markdown file, and it will be parsed. You can use this feature to write vue demo and documentation together.
-
-## Basic usage
-
-Load the Vue in `./index.html`.
-
-```html
-
-
-
-
-
-
-```
-
-Then you can immediately write Vue code at Markdown file. `new Vue({ el: '#main' })` script is executed by default to create instance.
-
-*README.md*
-
-````markdown
-# Vue guide
-
-`v-for` usage.
-
-```html
-
-
{{ i }}
-
-```
-
-
-
{{ i }}
-
-````
-
-You can manually initialize a Vue instance.
-
-*README.md*
-
-```markdown
-# Vue demo
-
-
hello {{ msg }}
-
-
-```
-
-!> In a Markdown file, only the script within the first script tag is executed.
-
-## Combine Vuep to write playground
-
-[Vuep](https://github.com/QingWei-Li/vuep) is a component for rendering Vue components with live editor and preview. Supports Vue component spec and JSX.
-
-*index.html*
-
-```html
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-*README.md*
-```markdown
-# Vuep
-
-
-
-
-
-```
-
-?> Example Refer to the [Vuep documentation](https://qingwei-li.github.io/vuep/).
diff --git a/docs/write-a-plugin.md b/docs/write-a-plugin.md
deleted file mode 100644
index baa894e..0000000
--- a/docs/write-a-plugin.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# Write a plugin
-
-A plugin is simply a function that takes `hook` as an argument. The hook supports handling of asynchronous tasks.
-
-## Full configuration
-
-```js
-window.$docsify = {
- plugins: [
- function(hook, vm) {
- hook.init(function() {
- // Called when the script starts running, only trigger once, no arguments,
- });
-
- hook.beforeEach(function(content) {
- // Invoked each time before parsing the Markdown file.
- // ...
- return content;
- });
-
- hook.afterEach(function(html, next) {
- // Invoked each time after the Markdown file is parsed.
- // beforeEach and afterEach support asynchronous。
- // ...
- // call `next(html)` when task is done.
- next(html);
- });
-
- hook.doneEach(function() {
- // Invoked each time after the data is fully loaded, no arguments,
- // ...
- });
-
- hook.mounted(function() {
- // Called after initial completion. Only trigger once, no arguments.
- });
-
- hook.ready(function() {
- // Called after initial completion, no arguments.
- });
- }
- ]
-};
-```
-
-!> You can get internal methods through `window.Docsify`. Get the current instance through the second argument.
-
-## Example
-
-#### footer
-
-Add footer component in each pages.
-
-```js
-window.$docsify = {
- plugins: [
- function(hook) {
- var footer = [
- '',
- ''
- ].join('');
-
- hook.afterEach(function(html) {
- return html + footer;
- });
- }
- ]
-};
-```
-
-### Edit Button
-
-```js
-window.$docsify = {
- plugins: [
- function(hook, vm) {
- hook.beforeEach(function(html) {
- var url =
- 'https://github.com/docsifyjs/docsify/blob/master/docs/' +
- vm.route.file;
- var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n';
-
- return (
- editHtml +
- html +
- '\n----\n' +
- 'Last modified {docsify-updated} ' +
- editHtml
- );
- });
- }
- ]
-};
-```
-
-## Tips
-
-### Get docsify version
-
-```
-console.log(window.Docsify.version)
-```
-
-Current version: loading
-
-
diff --git a/docs/zh-cn.md b/docs/zh-cn.md
new file mode 100644
index 0000000..da83dff
--- /dev/null
+++ b/docs/zh-cn.md
@@ -0,0 +1,513 @@
+
+## 特性
+- 无需构建,写完 markdown 直接发布
+- 支持自定义主题
+- 容易使用并且轻量 (~12kb gzipped)
+
+## 快速上手
+
+### 创建项目
+新建一个空项目,接着创建一个 `docs` 目录并进入到 docs 目录下
+```bash
+mkdir my-project && cd my-project
+mkdir docs && cd docs
+```
+
+### 创建入口文件
+创建一个 `index.html` 文件,内容为
+```html
+
+
+
+
+
+
+
+
+
+
+
+```
+
+新建 `README.md` 文件,作为主页面
+
+```
+# Title
+
+## balabala
+```
+
+### 部署!
+将项目 `push` 到 GitHub 仓库后到设置页面开启 **GitHub Pages** 功能,选择 `docs/` 选项
+
+
+## 命令行工具
+
+方便快速创建文档目录,会读取项目的 `package.json` 里的选项作为 docsify 的配置,支持本地预览。
+
+### 安装
+```bash
+npm i docsify-cli -g
+```
+
+### 初始化文档
+
+默认初始化在当前目录,推荐将文档放在 `docs` 目录下
+```bash
+docsify init docs
+```
+
+### 启动本地服务
+启动一个 server 方便预览,打开 http://localhost:3000
+```bash
+docsify serve docs
+```
+
+更多选项参考 [docsify-cli](https://github.com/QingWei-Li/docsify-cli)
+
+
+## 更多功能
+
+### 主题
+目前提供 vue.css 和 buble.css,直接修改 `index.html` 里的 cdn 地址即可
+```html
+
+
+```
+
+压缩版
+
+```html
+
+
+```
+
+### 多页面
+`README.md` 作为主页面,如果需要其他页面,直接在文档目录下创建对应的 `*.md` 文件,例如创建一个 `guide.md` 那么对应的路由就是 `/#/guide`。
+
+### 导航
+导航需要自己写在 `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)
+
+### 封面
+
+只需要写几行简单的 markdown 就可以拥有一页精致的封面,通过添加 `data-coverpage` 属性,并创建 `_coverpage.md`,按照下面的格式书写即可。
+
+```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)
+```
+
+
+#### 自定义封面背景
+默认的背景是随机生成的,你可以自定义背景色或者背景图片。只需要在文档末尾用添加图片的 Markdown 语法
+
+```markdown
+# docsify 1.2.0
+
+> xxx
+
+[GitHub](https://github.com/QingWei-Li/docsify/)
+[Get Started](#quick-start)
+
+
+
+
+
+```
+
+### 自定义 Markdown parser
+
+默认使用 [marked](https://github.com/chjj/marked) 处理 markdown 部分,你可以修改默认配置
+
+```js
+window.$docsify = {
+ markdown: {
+ smartypants: true
+ }
+}
+```
+
+甚至可以完全定制化
+
+```js
+window.$docsify = {
+ markdown: function(marked) {
+ // ...
+
+ return marked
+ }
+}
+```
+
+### 文档助手
+#### 内置「提示」语法
+
+`!>`后面接内容,会渲染成带 tip 类名的段落。
+
+```markdown
+!> 提示信息,**支持其他 markdown 语法**
+```
+
+将被渲染成
+
+```html
+