## Links
+- [`develop` branch preview](https://docsifyjs.netlify.com/)
- [Documentation](https://docsify.js.org)
-- [CLI](https://github.com/QingWei-Li/docsify-cli)
-- CDN: [UNPKG](https://unpkg.com/docsify/) | [jsDelivr](https://cdn.jsdelivr.net/npm/docsify/)
+- [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)
## Features
- No statically built html files
-- Simple and lightweight (~18kB gzipped)
+- Simple and lightweight (~21kB gzipped)
- Smart full-text search plugin
- Multiple themes
- Useful plugin API
-- Compatible with IE10+
-- Support SSR ([example](https://github.com/QingWei-Li/docsify-ssr-demo))
+- Compatible with IE11
+- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
+- Support embedded files
## Quick start
-Create an `index.html`.
+Look at [this tutorial](https://docsify.js.org/#/quickstart)
-```html
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-## Browser Support
-
-Modern browsers and Internet Explorer 10+.
+[](https://codesandbox.io/s/307qqv236)
## Showcase
These projects are using docsify to generate their sites. Pull requests welcome :blush:
-| Project | Description |
-|---|---|
-| [Snipaste](https://docs.snipaste.com/) | Snip & Paste |
-| [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. |
-| [Mybatis-Plus](http://mp.baomidou.com/) | An enhanced toolkit of Mybatis to simplify development |
-| [JS MythBusters](https://mythbusters.js.org) | An optimization handbook from a high level point of view. |
-| [hire-me](https://fvcproductions.github.io/hire-me) | A path to getting an awesome tech gig. |
-| [vue-amap](https://elemefe.github.io/vue-amap/) | A Map Component Library Base on Vue 2.x and Gaode Map. |
-| [samlify](https://samlify.js.org) | Node.js SAML2 library |
-| [palettify](https://dobromir-hristov.github.io/palettify/) | A color palette effects assistant |
-| [commitlint](https://marionebl.github.io/commitlint/) | Lint commit messages |
-| [vue-data-tables](https://github.com/njleonzhang/vue-data-tables/) | A simple and customizable data table,based on vue2 and element-ui. |
-| [Noty](http://ned.im/noty/) | A Dependency-free notification library |
+Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
## Similar projects
-| Project | Description |
-|---|---|
-| [docute](https://github.com/egoist/docute) | 📜 Effortlessly documentation done right |
-| [docpress](https://github.com/docpress/docpress) | Documentation website generator |
+| Project | Description |
+| ------------------------------------------------ | ---------------------------------------- |
+| [docute](https://github.com/egoist/docute) | 📜 Effortlessly documentation done right |
+| [docpress](https://github.com/docpress/docpress) | Documentation website generator |
## Contributing
@@ -92,16 +72,40 @@ These projects are using docsify to generate their sites. Pull requests welcome
- Push to the branch: `git push origin my-new-feature`
- Submit a pull request
-
## Development
```bash
npm run bootstrap && npm run dev
-open http://localhost:3000
```
+## Backers
+
+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)].
+
+
## License
-MIT
+[MIT](LICENSE)
-[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FQingWei-Li%2Fdocsify?ref=badge_large)
+[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify?ref=badge_large)
diff --git a/app.js b/app.js
deleted file mode 100644
index 7fe1391..0000000
--- a/app.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var serveStatic = require('serve-static')
-var http = require('http')
-var fs = require('fs')
-var Renderer = require('./packages/docsify-server-renderer/build.js')
-
-var renderer = new Renderer({
- template: `
-
-
-
-
- docsify
-
-
-
-
-
-
-
-
-`,
- config: {
- name: 'docsify',
- repo: 'qingwei-li/docsify',
- basePath: 'https://docsify.js.org/',
- loadNavbar: true,
- loadSidebar: true,
- subMaxLevel: 3,
- auto2top: true,
- alias: {
- '/de-de/changelog': '/changelog',
- '/zh-cn/changelog': '/changelog',
- '/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
- }
- },
- path: './'
-})
-
-http.createServer(function (req, res) {
- serveStatic('.')(req, res, function () {
- // TEST SSR
- // renderer.renderToString(req.url)
- // .then(html => res.end(html))
-
- 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
deleted file mode 100644
index 40672e0..0000000
--- a/build/build-css.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var fs = require('fs')
-var cssnano = require('cssnano').process
-var resolve = require('path').resolve
-var postcss = require('postcss')
-var isProd = process.argv[process.argv.length - 1] !== '--dev'
-
-var processor = postcss([require('postcss-salad')({
- features: {
- precss: {
- properties: {
- preserve: true
- }
- }
- }
-})])
-
-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)
- isProd && 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 00d8601..7b61224 100644
--- a/build/build.js
+++ b/build/build.js
@@ -1,73 +1,119 @@
-var rollup = require('rollup')
-var buble = require('rollup-plugin-buble')
-var commonjs = require('rollup-plugin-commonjs')
-var nodeResolve = require('rollup-plugin-node-resolve')
-var string = require('rollup-plugin-string')
-var uglify = require('rollup-plugin-uglify')
-var replace = require('rollup-plugin-replace')
-var isProd = process.argv[process.argv.length - 1] !== '--dev'
-var version = process.env.VERSION || require('../package.json').version
+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 build = function (opts) {
+const build = function (opts) {
rollup
.rollup({
- entry: 'src/' + opts.entry,
+ input: opts.input,
plugins: (opts.plugins || []).concat([
- string({ include: '**/*.css' }),
buble(),
commonjs(),
nodeResolve(),
replace({
- __VERSION__: version
+ __VERSION__: version,
+ 'process.env.SSR': false
})
])
})
.then(function (bundle) {
- var dest = 'lib/' + (opts.output || opts.entry)
+ var dest = 'lib/' + (opts.output || opts.input)
console.log(dest)
bundle.write({
format: 'iife',
- dest: dest
+ file: dest,
+ strict: false
})
})
.catch(function (err) {
console.error(err)
})
}
-
-build({
- entry: 'core/index.js',
- output: 'docsify.js'
-})
-
-var plugins = [
- { name: 'search', entry: 'search/index.js' },
- { name: 'ga', entry: 'ga.js' },
- { name: 'emoji', entry: 'emoji.js' },
- { name: 'external-script', entry: 'external-script.js' },
- { name: 'front-matter', entry: 'front-matter/index.js' },
- { name: 'zoom-image', entry: 'zoom-image.js' }
-]
-
-plugins.forEach(item => {
+const buildCore = function () {
build({
- entry: 'plugins/' + item.entry,
- output: 'plugins/' + item.name + '.js'
+ input: 'src/core/index.js',
+ output: 'docsify.js'
})
-})
-if (isProd) {
- build({
- entry: 'core/index.js',
- output: 'docsify.min.js',
- plugins: [uglify()]
- })
- plugins.forEach(item => {
+ if (isProd) {
build({
- entry: 'plugins/' + item.entry,
- output: 'plugins/' + item.name + '.min.js',
+ 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()
}
diff --git a/build/build-cover.js b/build/cover.js
similarity index 78%
rename from build/build-cover.js
rename to build/cover.js
index f66fa8d..fbd27f7 100644
--- a/build/build-cover.js
+++ b/build/cover.js
@@ -7,5 +7,8 @@ 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 + '')
+cover = cover.replace(
+ /(\S+)?<\/small>/g,
+ '' + version + ''
+)
write(file, cover)
diff --git a/build/mincss.js b/build/mincss.js
new file mode 100644
index 0000000..f6c5ec2
--- /dev/null
+++ b/build/mincss.js
@@ -0,0 +1,12 @@
+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
old mode 100644
new mode 100755
diff --git a/build/build-ssr.js b/build/ssr.js
similarity index 80%
rename from build/build-ssr.js
rename to build/ssr.js
index a470f65..16b93ca 100644
--- a/build/build-ssr.js
+++ b/build/ssr.js
@@ -5,11 +5,12 @@ var replace = require('rollup-plugin-replace')
rollup
.rollup({
- entry: 'packages/docsify-server-renderer/index.js',
+ input: 'packages/docsify-server-renderer/index.js',
plugins: [
async(),
replace({
- __VERSION__: process.env.VERSION || require('../package.json').version
+ __VERSION__: process.env.VERSION || require('../package.json').version,
+ 'process.env.SSR': true
}),
buble({
transforms: {
@@ -17,7 +18,7 @@ rollup
}
})
],
- onwarn: function() {}
+ onwarn: function () {}
})
.then(function (bundle) {
var dest = 'packages/docsify-server-renderer/build.js'
@@ -25,7 +26,7 @@ rollup
console.log(dest)
bundle.write({
format: 'cjs',
- dest: dest
+ file: dest
})
})
.catch(function (err) {
diff --git a/dev.html b/dev.html
deleted file mode 100644
index 7e0c59b..0000000
--- a/dev.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
- docsify
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/README.md b/docs/README.md
index 1eb1660..e625420 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -2,27 +2,31 @@
> A magical documentation site generator.
-## What is it
+## 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 website. All you need to do is create an `index.html` to start and [deploy it on GitHub Pages](deploy.md).
+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) for more details.
+See the [Quick start](quickstart.md) guide for more details.
## Features
-* No statically built html files
-* Simple and lightweight (~18kB gzipped)
-* Smart full-text search plugin
-* Multiple themes
-* Useful plugin API
-* Emoji support
-* Compatible with IE10+
-- Support SSR ([example](https://github.com/QingWei-Li/docsify-ssr-demo))
+- No statically built html files
+- Simple and lightweight (~21kB gzipped)
+- Smart full-text search plugin
+- Multiple themes
+- Useful plugin API
+- Emoji support
+- Compatible with IE11
+- Support server-side rendering ([example](https://github.com/docsifyjs/docsify-ssr-demo))
## Examples
-Check out the [Showcase](https://github.com/QingWei-Li/docsify/#showcase) to docsify in use.
+Check out the [Showcase](https://github.com/docsifyjs/awesome-docsify#showcase) to see docsify in use.
## Donate
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:
+
+## 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 f1ce818..1decbd6 100644
--- a/docs/_coverpage.md
+++ b/docs/_coverpage.md
@@ -1,13 +1,12 @@

-# docsify 4.2.9
+# docsify 4.9.4
> A magical documentation site generator.
-- Simple and lightweight (~18kB gzipped)
+- Simple and lightweight (~21kB gzipped)
- No statically built html files
- Multiple themes
-
-[GitHub](https://github.com/QingWei-Li/docsify/)
-[Get Started](#docsify)
+[GitHub](https://github.com/docsifyjs/docsify/)
+[Getting Started](#docsify)
diff --git a/docs/_media/example.html b/docs/_media/example.html
new file mode 100644
index 0000000..d35ee16
--- /dev/null
+++ b/docs/_media/example.html
@@ -0,0 +1 @@
+
To infinity and Beyond!
\ No newline at end of file
diff --git a/docs/_media/example.js b/docs/_media/example.js
new file mode 100644
index 0000000..7b6f668
--- /dev/null
+++ b/docs/_media/example.js
@@ -0,0 +1,16 @@
+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
new file mode 100644
index 0000000..6ee6494
--- /dev/null
+++ b/docs/_media/example.md
@@ -0,0 +1 @@
+> This is from the `example.md`
diff --git a/docs/_navbar.md b/docs/_navbar.md
index eccd441..47a2356 100644
--- a/docs/_navbar.md
+++ b/docs/_navbar.md
@@ -1,4 +1,6 @@
- Translations
+ - [:uk: English](/)
- [:cn: 中文](/zh-cn/)
- [:de: Deutsch](/de-de/)
- - [:uk: English](/)
+ - [:es: Spanish](/es/)
+ - [:ru: Russian](/ru/)
diff --git a/docs/_sidebar.md b/docs/_sidebar.md
index 0fa0428..051514b 100644
--- a/docs/_sidebar.md
+++ b/docs/_sidebar.md
@@ -1,10 +1,12 @@
- 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)
@@ -13,11 +15,14 @@
- [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-client renderer(SSR)](ssr.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
index 2166732..eba77a8 100644
--- a/docs/cdn.md
+++ b/docs/cdn.md
@@ -12,7 +12,7 @@ Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon
```
-Alternatively, use [compressed files](#compressed-files).
+Alternatively, use [compressed files](#compressed-file).
## Specific version
diff --git a/docs/configuration.md b/docs/configuration.md
index 1c0b680..ba48475 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1,30 +1,17 @@
# Configuration
-**docsify** supports two different ways of configuration. You can configure the `window.$docsify` or write configuration on the script tag via `data-*` attributes.
+You can configure the `window.$docsify`.
```html
-
-
-
-
```
-Both ways are compatible. However, the first way is recommended. It is clear and can be configured in a separate file.
-
-!> In `window.$docsfiy`, the options should be written by camelCase.
-
## el
- Type: `String`
@@ -35,7 +22,7 @@ The DOM element to be mounted on initialization. It can be a CSS selector string
```js
window.$docsify = {
el: '#app'
-}
+};
```
## repo
@@ -47,13 +34,13 @@ Configure the repository url or a string of `username/repo` can add the [GitHub
```js
window.$docsify = {
- repo: 'QingWei-Li/docsify',
+ repo: 'docsifyjs/docsify',
// or
- repo: 'https://github.com/QingWei-Li/docsify/'
-}
+ repo: 'https://github.com/docsifyjs/docsify/'
+};
```
-## max-level
+## maxLevel
- Type: `Number`
- Default: `6`
@@ -63,10 +50,10 @@ Maximum Table of content level.
```js
window.$docsify = {
maxLevel: 4
-}
+};
```
-## load-navbar
+## loadNavbar
- Type: `Boolean|String`
- Default: `false`
@@ -80,10 +67,10 @@ window.$docsify = {
// load from nav.md
loadNavbar: 'nav.md'
-}
+};
```
-## load-sidebar
+## loadSidebar
- Type: `Boolean|String`
- Default: `false`
@@ -97,10 +84,10 @@ window.$docsify = {
// load from summary.md
loadSidebar: 'summary.md'
-}
+};
```
-## sub-max-level
+## subMaxLevel
- Type: `Number`
- Default: `0`
@@ -110,7 +97,7 @@ Add table of contents (TOC) in custom sidebar.
```js
window.$docsify = {
subMaxLevel: 2
-}
+};
```
## auto2top
@@ -123,7 +110,7 @@ Scrolls to the top of the screen when the route is changed.
```js
window.$docsify = {
auto2top: true
-}
+};
```
## homepage
@@ -139,11 +126,12 @@ window.$docsify = {
homepage: 'home.md',
// Or use the readme in your repo
- homepage: 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md'
-}
+ homepage:
+ 'https://raw.githubusercontent.com/docsifyjs/docsify/master/README.md'
+};
```
-## base-path
+## basePath
- Type: `String`
@@ -157,13 +145,54 @@ window.$docsify = {
basePath: 'https://docsify.js.org/',
// Even can load files from other repo
- basePath: 'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/'
-}
+ 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`
+- Type: `Boolean|String|String[]|Object`
- Default: `false`
Activate the [cover feature](cover.md). If true, it will load from `_coverpage.md`.
@@ -173,8 +202,29 @@ window.$docsify = {
coverpage: true,
// Custom file name
- coverpage: 'cover.md'
-}
+ 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
@@ -186,10 +236,10 @@ Website name as it appears in the sidebar.
```js
window.$docsify = {
name: 'docsify'
-}
+};
```
-## name-link
+## nameLink
- Type: `String`
- Default: `window.location.pathname`
@@ -205,7 +255,7 @@ window.$docsify = {
'/zh-cn/': '/zh-cn/',
'/': '/'
}
-}
+};
```
## markdown
@@ -227,14 +277,14 @@ window.$docsify = {
},
// function
- markdown: function (marked, renderer) {
+ markdown: function(marked, renderer) {
// ...
- return marked
+ return marked;
}
-}
+};
```
-## theme-color
+## themeColor
- Type: `String`
@@ -243,7 +293,7 @@ Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en
```js
window.$docsify = {
themeColor: '#3F51B5'
-}
+};
```
## alias
@@ -257,34 +307,36 @@ window.$docsify = {
alias: {
'/foo/(+*)': '/bar/$1', // supports regexp
'/zh-cn/changelog': '/changelog',
- '/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
+ '/changelog':
+ 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG',
+ '/.*/_sidebar.md': '/_sidebar.md' // See #301
}
-}
+};
```
-## auto-header
+## 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/QingWei-Li/docsify/issues/78).
+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
-}
+};
```
-## execute-script
+## 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.
+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
@@ -297,7 +349,7 @@ window.$docsify = {
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.
-## no-emoji
+## noEmoji
- type: `Boolean`
@@ -306,10 +358,10 @@ Disabled emoji parse.
```js
window.$docsify = {
noEmoji: true
-}
+};
```
-## merge-navbar
+## mergeNavbar
- type: `Boolean`
@@ -318,65 +370,149 @@ Navbar will be merged with the sidebar on smaller screens.
```js
window.$docsify = {
mergeNavbar: true
-}
+};
```
-## format-updated
+## 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) {
+ formatUpdated: function(time) {
// ...
- return time
+ return time;
}
-}
+};
```
-## external-link-target
+## externalLinkTarget
- type: `String`
-- default: `_self`
+- default: `_blank`
Target to open external links. Default `'_blank'` (new window/tab)
```js
window.$docsify = {
externalLinkTarget: '_self' // default: '_blank'
-}
+};
```
-## router-mode
+## routerMode
- type: `String`
-- default: `history`
+- 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/QingWei-Li/docsify/issues/203)
-
+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/.*'
- ]
-}
+ 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
index f91b71e..555f4ff 100644
--- a/docs/cover.md
+++ b/docs/cover.md
@@ -26,11 +26,11 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
> A magical documentation site generator.
-- Simple and lightweight (~18kB gzipped)
+- Simple and lightweight (~21kB gzipped)
- No statically built html files
- Multiple themes
-[GitHub](https://github.com/QingWei-Li/docsify/)
+[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#docsify)
```
@@ -45,12 +45,55 @@ The background color is generated randomly by default. You can customize the bac
# docsify 3.5
-[GitHub](https://github.com/QingWei-Li/docsify/)
+[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
index 1642918..324ad81 100644
--- a/docs/custom-navbar.md
+++ b/docs/custom-navbar.md
@@ -20,7 +20,7 @@ If you need custom navigation, you can create a HTML-based navigation bar.
## Markdown
-Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`, compare [load-navbar configuration](configuration.md#load-navbar).
+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
@@ -36,13 +36,13 @@ Alternatively, you can create a custom markdown-based navigation file by setting
```markdown
-- [En](/)
-- [chinese](/zh-cn/)
+* [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`.
+`_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
@@ -51,23 +51,24 @@ 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)
+* Getting started
-- Configuration
- - [Configuration](configuration.md)
- - [Themes](themes.md)
- - [Using plugins](plugins.md)
- - [Markdown configuration](markdown.md)
- - [Language highlight](language-highlight.md)
+ * [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
@@ -90,6 +91,6 @@ you could, for example, use flag emojis in your custom navbar Markdown file:
```markdown
-- [:us:, :uk:](/)
-- [:cn:](/zh-cn/)
+* [:us:, :uk:](/)
+* [:cn:](/zh-cn/)
```
diff --git a/docs/de-de/README.md b/docs/de-de/README.md
deleted file mode 100644
index 21079cc..0000000
--- a/docs/de-de/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-## docsify
-
-> Ein magischer Generator für Dokumentationen.
-
-## Was ist das
-
-**docsify** generiert deine Dokumentationswebseite zeitgleich (mit der Darstellung). Im Gegensatz zu GitBook, werden keine statischen HTML Seiten generiert. Stattdessen, werden im Hintergrund Markdown Dateien geladen und umgewandelt, und als Webseite dargestellt. Alles, was du brauchst, ist eine Datei namens `index.html`, um sie über [GitHub Pages zu veröffentlichen](de-de/deploy.md).
-
-Siehe [Schnellstart](de-de/quickstart.md) für weitere Informationen.
-
-## Features
-
-* keine generierten, statischen HTML Dateien
-* einfach und klein (~18kB gzipped)
-* smarte Erweiterung mit Volltextsuche
-* mehrere Themes
-* praktische API für Erweiterungen
-* Unterstützung für Emoji
-* Kompatibel mit IE10+
-- Support SSR ([example](https://github.com/QingWei-Li/docsify-ssr-demo))
-
-## Beispiele
-
-Vergleiche die Liste namens [Showcase](https://github.com/QingWei-Li/docsify/#showcase) mit Beispielen, wie **docsify** verwendet wird.
-
-## Spenden
-
-Bitte ziehe eine Spende in Erwägung, sollte **docsify** dir hilfreich oder meine Arbeit dir wertvoll erscheinen. Ich freue mich, wenn du mir [eine Tasse Kaffee kaufst](https://github.com/QingWei-Li/donate). :heart:
diff --git a/docs/de-de/_sidebar.md b/docs/de-de/_sidebar.md
deleted file mode 100644
index f992cca..0000000
--- a/docs/de-de/_sidebar.md
+++ /dev/null
@@ -1,23 +0,0 @@
-- Loslegen
- - [Schnellstart](de-de/quickstart.md)
- - [Schreiben weiterer Seiten](de-de/more-pages.md)
- - [Navigationsleiste anpassen](de-de/custom-navbar.md)
- - [Titelseite](de-de/cover.md)
-
-- Anpassen
- - [Einstellungen](de-de/configuration.md)
- - [Themen](de-de/themes.md)
- - [Liste der Erweiterungen](de-de/plugins.md)
- - [Schreiben eigener Erweiterungen](de-de/write-a-plugin.md)
- - [Markdown-Einstellungen](de-de/markdown.md)
- - [Hervorheben von Sprachen](de-de/language-highlight.md)
-
-- Guide
- - [Inbetriebnahme](de-de/deploy.md)
- - [Helfer](de-de/helpers.md)
- - [Vue Kompatibilität](de-de/vue.md)
- - [CDN](de-de/cdn.md)
- - [Offline Modus (PWA)](de-de/pwa.md)
- - [Server-client renderer (SSR)](de-de/ssr.md)
-
-- [Changelog](de-de/changelog.md)
diff --git a/docs/de-de/cdn.md b/docs/de-de/cdn.md
deleted file mode 100644
index 4e79348..0000000
--- a/docs/de-de/cdn.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# CDN
-
-Empfohlen: [unpkg](//unpkg.com), welches jeweils die aktuelle Version liefert, wie sie über npm veröffentlicht wurde. Du kannst auch den Quellcode des npm Packets über [unpkg.com/docsify/](//unpkg.com/docsify/) anschauen.
-
-## Aktuelle Version
-
-```html
-
-
-
-
-
-```
-
-Alternativ kannst du auch die [komprimierten Dateien](#komprimierte-dateien) verwenden.
-
-## Spezielle Version
-
-```html
-
-
-
-
-
-```
-
-## Komprimierte Dateien
-
-```html
-
-
-
-
-
-```
-
-```html
-
-
-
-
-
-```
-
-## Andere CDN
-
-- http://www.bootcdn.cn/docsify
-- https://cdn.jsdelivr.net/npm/docsify/
-- https://cdnjs.com/libraries/docsify
diff --git a/docs/de-de/configuration.md b/docs/de-de/configuration.md
deleted file mode 100644
index ebf8920..0000000
--- a/docs/de-de/configuration.md
+++ /dev/null
@@ -1,361 +0,0 @@
-# Einstellungen
-
-**docsify** unterstützt zwei verschiedene Arten, um die Einstellungen anzupassen. Du kannst das `window.$docsify` anpassen, oder die Einstellungen über das script tag im `data-*` Attribut vornehmen.
-
-```html
-
-
-
-
-
-```
-
-Beide Arten sind miteinander kompatibel, wobei die erste jedoch empfohlen wird. Sie ist deutlicher und kann in einer separaten Datei geführt werden.
-
-!> Innerhalb des `window.$docsfiy` sollten die Optionen mit camelCase geschrieben werden.
-
-## el
-
-- Typ: `String`
-- Standard: `#app`
-
-Das DOM Element kann bei der Initialisierung gesetzt werden. Es kann ein CSS selector string oder ein richtiges HTMLElement sein.
-
-```js
-window.$docsify = {
- el: '#app'
-}
-```
-
-## repo
-
-- Typ: `String`
-- Standard: `null`
-
-Verwende die repository URL oder eine Zeichenfolge aus `Benutzername/repo`, um das [GitHub Corner](http://tholman.com/github-corners/) widget in die obere rechte Ecke der Seite zu implementieren.
-
-```js
-window.$docsify = {
- repo: 'QingWei-Li/docsify',
- // oder
- repo: 'https://github.com/QingWei-Li/docsify/'
-}
-```
-
-## max-level
-
-- Typ: `Number`
-- Standard: `6`
-
-Maximale Anzahl der Inhaltsübersichtebenen.
-
-```js
-window.$docsify = {
- maxLevel: 4
-}
-```
-
-## load-navbar
-
-- Typ: `Boolean|String`
-- Standard: `false`
-
-Lädt die Navigationsleiste von der Markdown Datei `_navbar.md` falls **true**, oder vom gewählten Pfad.
-
-```js
-window.$docsify = {
- // lade von _navbar.md
- loadNavbar: true,
-
- // lade von nav.md
- loadNavbar: 'nav.md'
-}
-```
-
-## load-sidebar
-
-- Typ: `Boolean|String`
-- Standard: `false`
-
-Lädt das seitliche Inhaltsverzeichnis von der Markdown Datei `_sidebar.md` falls **true**, oder vom gewählten Pfad.
-
-```js
-window.$docsify = {
- // lade von _sidebar.md
- loadSidebar: true,
-
- // lade von summary.md
- loadSidebar: 'summary.md'
-}
-```
-
-## sub-max-level
-
-- Typ: `Number`
-- Standard: `0`
-
-Wähle die maximale Anzahl der Unterpunkte pro Datei in der Inhaltsübersicht.
-
-```js
-window.$docsify = {
- subMaxLevel: 2
-}
-```
-
-## auto2top
-
-- Typ: `Boolean`
-- Standard: `false`
-
-Scrolle zum Anfang der Seite, wenn die Route gewechselt wird.
-
-```js
-window.$docsify = {
- auto2top: true
-}
-```
-
-## homepage
-
-- Typ: `String`
-- Standard: `README.md`
-
-`README.md` in deinem Ordner für die Dokumentation wird als Startseite für deine Webseite gesetzt, aber manchmal musst du das vielleicht ändern.
-
-```js
-window.$docsify = {
- // Wähle /home.md
- homepage: 'home.md',
-
- // Oder verwende das README in deinem repo
- homepage: 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md'
-}
-```
-
-## base-path
-
-- Typ: `String`
-
-Der Basispfad der Webseite. Du kannst einen anderen Ordner wählen, oder eine andere Domain.
-
-```js
-window.$docsify = {
- basePath: '/path/',
-
- // Lade die Dateien von einer anderen Domain
- basePath: 'https://docsify.js.org/',
-
- // Oder lade Dateien von einem anderen repo
- basePath: 'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/'
-}
-```
-
-## coverpage
-
-- Typ: `Boolean|String`
-- Standard: `false`
-
-Aktiviere das [Titelseitenfeature](de-de/cover.md). Falls `true`, wird sie von `_coverpage.md` geladen.
-
-```js
-window.$docsify = {
- coverpage: true,
-
- // Anderer Dateiname
- coverpage: 'cover.md'
-}
-```
-
-## name
-
-- Typ: `String`
-
-Webseitenname, wie er in der Inhaltsübersicht in der Seitenleiste angezeigt wird.
-
-```js
-window.$docsify = {
- name: 'docsify'
-}
-```
-
-## name-link
-
-- Typ: `String`
-- Standard: `window.location.pathname`
-
-Der Name der Links.
-
-```js
-window.$docsify = {
- nameLink: '/',
-
- // Für jede Route
- nameLink: {
- '/zh-cn/': '/zh-cn/',
- '/': '/'
- }
-}
-```
-
-## markdown
-
-- Typ: `Function`
-
-Siehe [Markdown Konfiguration](de-de/markdown.md).
-
-```js
-window.$docsify = {
- // Objekt
- markdown: {
- smartypants: true,
- renderer: {
- link: function() {
- // ...
- }
- }
- },
-
- // Funktion
- markdown: function (marked, renderer) {
- // ...
- return marked
- }
-}
-```
-
-## theme-color
-
-- Typ: `String`
-
-Passe die Farbe der Themen an. Verwende [CSS3 Variablen](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) und polyfill in älteren Browsern.
-
-```js
-window.$docsify = {
- themeColor: '#3F51B5'
-}
-```
-
-## alias
-
-- Typ: `Object`
-
-Verwende alternative Routen. Du kannst sie ungehindert anpassen. Supports RegExp.
-
-```js
-window.$docsify = {
- alias: {
- '/foo/(+*)': '/bar/$1', // supports regexp
- '/zh-cn/changelog': '/changelog',
- '/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
- }
-}
-```
-
-## auto-header
-
-- Typ: `Boolean`
-
-Sollten `loadSidebar` und `autoHeader` beide aktiviert sein, setze einen Header vor die Seite in jedem Link in `_sidebar.md`, bevor sie in HTML umgewandelt wird. Vergleiche [#78](https://github.com/QingWei-Li/docsify/issues/78).
-
-```js
-window.$docsify = {
- loadSidebar: true,
- autoHeader: true
-}
-```
-
-## execute-script
-
-- Typ: `Boolean`
-
-Führe das Skript auf der Seite aus. Analysiere nur das erste script tag ([demo](de-de/themes.md)). Sollte Vue verwendet sein, wird es in der Standardeinstellung ausgeführt.
-
-```js
-window.$docsify = {
- executeScript: true
-}
-```
-
-```markdown
-## Dies ist ein Test
-
-
-```
-
-?> Nehme zur Kenntnis, dass, solltest du ein externes Skript ausführen, z.B. ein eingebettete jsfiddle demo, du sicher gehen solltest, das [external-script](de-de/plugins.md?id=external-script) plugin zu verwenden.
-
-## no-emoji
-
-Verhindere die Umwandlung in Emojis:
-
-```js
-window.$docsify = {
- noEmoji: true
-}
-```
-
-## merge-navbar
-
-Navbar will be merged with the sidebar on smaller screens.
-
-```js
-window.$docsify = {
- mergeNavbar: true
-}
-```
-
-## format-updated
-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
- }
-}
-```
-
-## external-link-target
-
-Currently it defaults to _blank, would be nice if configurable:
-
-```js
-window.$docsify = {
- externalLinkTarget: '_self' // default: '_blank'
-}
-```
-
-
-## noCompileLinks
-
-- type: `Array`
-
-
-Sometimes we do not want docsify to handle our links. See [#203](https://github.com/QingWei-Li/docsify/issues/203)
-
-
-```js
-window.$docsify = {
- noCompileLinks: [
- '/foo',
- '/bar/.*'
- ]
-}
-```
diff --git a/docs/de-de/cover.md b/docs/de-de/cover.md
deleted file mode 100644
index e4513cd..0000000
--- a/docs/de-de/cover.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Titelseite
-
-Aktiviere die Unterstützung für Titelseiten, indem du `coverpage` auf **true** einstellst, vergleiche [coverpage Einstellungen](configuration.md#coverpage).
-
-## Einfache Verwendung
-
-Setze `coverpage` auf **true**, und erstelle `_coverpage.md`:
-
-```html
-
-
-
-
-```
-
-```markdown
-
-
-
-
-# docsify 3.5
-
-> Ein magischer Generator für Dokumentationsseiten.
-
-- Einfach und wenig Speicherbedarf (~18kB gzipped)
-- Keine statischen HTML Dateien
-- Mehrere Themes
-
-[GitHub](https://github.com/QingWei-Li/docsify/)
-[Schnellstart](#docsify)
-```
-
-!> Die Dokumentationsseiten können nur eine Titelseite haben!
-
-## Eigener Hintergrund
-
-Die Hintergrundfarbe wird in der Standardeinstellung zufällig generiert. Du kannst sie anpassen, oder auch ein Hintergrundbild verwenden:
-
-```markdown
-
-
-# docsify 3.5
-
-[GitHub](https://github.com/QingWei-Li/docsify/)
-[Schnellstart](#quick-start)
-
-
-
-
-
-
-```
diff --git a/docs/de-de/custom-navbar.md b/docs/de-de/custom-navbar.md
deleted file mode 100644
index 7ec8681..0000000
--- a/docs/de-de/custom-navbar.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# Navigationsleiste anpassen
-
-## HTML
-
-Solltest du eine Navigationsleiste benötigen, so kannst du eine HTML-basierte erstellen.
-
-!> Die Links der Dokumentation fangen alle mit `#/` an.
-
-```html
-
-
-
-
-
-
-```
-
-## Markdown
-
-Oder du kannst deine Navigationsleiste mit einer Datei basierend auf Markdown erstellen, indem du `loadNavbar` auf **true** setzt und eine Datei namens `_navbar.md` erstellst, vergleiche [load-navbar Einstellungen](configuration.md#load-navbar).
-
-```html
-
-
-
-
-```
-
-```markdown
-
-
-- [En](/)
-- [Deutsch](/de-de/)
-```
-
-!> Solltest du Github Pages verwenden, musst du zusätzlich eine Datei namens `.nojekyll` in `./docs` erstellen, um zu verhindern, dass Github Dateien ignoriert, die mit einem Unterstrich anfangen.
-
-`_navbar.md` wird in jedem Verzeichnislevel geladen. Sollte das aktuelle Verzeichnis keine Datei namens `_navbar.md` haben, so sucht **docsify** in den übergeordneten Ordnern. Wenn du z.B. im Moment im Verzeichnis `/guide/quick-start` bist, so wird `_navbar.md` von der Datei `/guide/_navbar.md` geladen.
-
-## Aufbauen von Strukturen
-
-Du kannst untergeordnete Listen erstellen, indem du untergeordnete Punkte einem übergeordneten Punkt gegenüber einrückst.
-
-```markdown
-
-
-- Getting started
- - [Quick start](de-de/quickstart.md)
- - [Writing more pages](de-de/more-pages.md)
- - [Custom navbar](de-de/custom-navbar.md)
- - [Cover page](de-de/cover.md)
-
-- Configuration
- - [Configuration](de-de/configuration.md)
- - [Themes](de-de/themes.md)
- - [Using plugins](de-de/plugins.md)
- - [Markdown configuration](de-de/markdown.md)
- - [Language highlight](de-de/language-highlight.md)
-```
-
-wird also wie folgt aussehen
-
-
-
-## Angepasste Navigationsleisten in Verbindung mit dem emoji Erweiterung
-
-Solltest du die [emoji Erweiterung](plugins.md#emoji) verwenden:
-
-```html
-
-
-
-
-
-```
-
-so kannst du z.B. auch die Flaggenemojis in der Markdown Datei für deine angepasste Navigationsleiste verwenden:
-
-```markdown
-
-
-- [:us:, :uk:](/)
-- [:de:](/de-de/)
-```
diff --git a/docs/de-de/deploy.md b/docs/de-de/deploy.md
deleted file mode 100644
index 3309f35..0000000
--- a/docs/de-de/deploy.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Inbetriebnahme
-
-Ähnlich wie bei [GitBook](https://www.gitbook.com), kannst du deine Dateien über GitHub Pages oder VPS erstellen.
-
-## GitHub Pages
-
-Du kannst folgende drei Orte verwenden, um die Dokumentation für dein Github repository zu verwalten:
-
-* `docs/` Ordner
-* master branch
-* gh-pages branch
-
-Es wird empfohlen, deine Dateien im `./docs` Unterordner im `master` branch deines repository zu speichern. Wechsle dann zu den Einstellungen deines repository und wähle `master branch /docs folder` als deine Github Pages Quelle.
-
-
-
-!> Du kannst die Dateien auch im Hauptverzeichnis speichern und dann `master branch` in den Einstellungen auswählen.
-
-## VPS
-
-Verwende folgende nginx config.
-
-```nginx
-server {
- listen 80;
- server_name your.domain.com;
-
- location / {
- alias /path/to/dir/of/docs;
- index index.html;
- }
-}
-```
diff --git a/docs/de-de/helpers.md b/docs/de-de/helpers.md
deleted file mode 100644
index 8cfe310..0000000
--- a/docs/de-de/helpers.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# Dokumentationshelfer
-
-docsify erweitert die Markdownsyntax, um deine Dokumente besser lesbar zu machen.
-
-## Wichtiger Inhalt
-
-Wichtiger Inhalt wie:
-
-```markdown
-!> **Zeit** ist Geld, mein Freund!
-```
-
-wird wie folgt gerendert:
-
-!> **Zeit** ist Geld, mein Freund!
-
-## Generelle Tipps
-
-Generelle Tipps wie:
-
-```markdown
-?> *TODO* unit test
-```
-
-wird wie folgt gerendert:
-
-?> *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")
-```
diff --git a/docs/de-de/language-highlight.md b/docs/de-de/language-highlight.md
deleted file mode 100644
index da69a45..0000000
--- a/docs/de-de/language-highlight.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Hervorheben von Sprachen
-
-**docsify** verwendet [Prism](https://github.com/PrismJS/prism) um Quellcodeabschnitte in deinen Seiten hervorzuheben. Als Standardeinstellung werden nur CSS, JavaScipt und HTML unterstützt. Du kannst **Prism** auch mit weiteren Sprachen verwenden:
-
-```html
-
-
-
-```
-
-?> Vergleiche die [component files](https://github.com/PrismJS/prism/tree/gh-pages/components) Liste für weitere Optionen.
diff --git a/docs/de-de/markdown.md b/docs/de-de/markdown.md
deleted file mode 100644
index 0a70b4d..0000000
--- a/docs/de-de/markdown.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Markdown Einstellungen
-
-**docsify** verwendet [marked](https://github.com/chjj/marked), um Markdown umzuwandeln. Du kannst einstellen, wie es deine Markdown Seiten in HTML umwandelt, indem du `renderer` konfigurierst:
-
-```js
-window.$docsify = {
- markdown: {
- smartypants: true,
- renderer: {
- link: function() {
- // ...
- }
- }
- }
-}
-```
-
-?> Für mögliche Einstellungen, siehe [marked Dokumentation](https://github.com/chjj/marked#options-1)
-
-Du kannst die Regeln auch beliebig anpassen.
-
-```js
-window.$docsify = {
- markdown: function(marked, renderer) {
- // ...
-
- return marked
- }
-}
-```
diff --git a/docs/de-de/more-pages.md b/docs/de-de/more-pages.md
deleted file mode 100644
index 1d32fc7..0000000
--- a/docs/de-de/more-pages.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# Noch mehr Seiten
-
-Wenn du mehr Seiten für deine Dokumentation brauchst, so kannst du weitere Markdown Dateien in deinem **docsify** Ordner erstellen. Eine Datei namens `guide.md` ist dann über `/#/guide` erreichbar.
-
-Nehmen wir als Beispiel folgende Verzeichnisstruktur:
-
-```text
-.
-├── docs
-| └── README.md
-| └── guide.md
-| └── de-de
-| └──README.md
-| └──guide.md
-```
-
-Die passenden Routen sind dann
-
-```text
-docs/README.md => http://domain.com
-docs/guide.md => http://domain.com/guide
-docs/de-de/README.md => http://domain.com/de-de/
-docs/de-de/guide.md => http://domain.com/de-de/guide
-```
-
-## Seitenleiste mit Inhaltsverzeichnis anpassen
-
-Als Standardeinstellung wird das Inhaltsverzeichnis in der Seitenleiste automatisch basierend auf vorhandenen Markdown Dateien generiert. Wenn du das seitliche Inhaltsverzeichnis anpassen willst, kannst du eine Datei namens `_sidebar.md` erstellen (vergleiche [das seitliche Inhaltsverzeichnis für diese Dokumentation](https://github.com/QingWei-Li/docsify/blob/master/docs/de-de/_sidebar.md) als Beispiel):
-
-Als Erstes musst du `loadSidebar` auf **true** setzen, vergleiche [Einstellungen für das seitliche Inhaltsverzeichnis](configuration.md#load-sidebar).
-
-```html
-
-
-
-
-```
-
-Als Zweites erstellst du eine Datei namens `_sidebar.md`:
-
-```markdown
-
-
-- [Home](/)
-- [Guide](de-de/guide.md)
-```
-
-!> Solltest du Github Pages verwenden, musst du zusätzlich eine Datei namens `.nojekyll` in `./docs` erstellen, um zu verhindern, dass Github Dateien ignoriert, die mit einem Unterstrich anfangen.
-
-`_sidebar.md` wird in jedem Verzeichnislevel geladen. Sollte das aktuelle Verzeichnis keine Datei namens `_sidebar.md` haben, so sucht **docsify** in den übergeordneten Ordnern. Wenn du z.B. im Moment im Verzeichnis `/guide/quick-start` bist, so wird `_sidebar.md` von der Datei `/guide/_sidebar.md` geladen.
-
-## Inhaltsverzeichnis
-
-Eine angepasste Seitenleist kann auch automatisch ein Inhaltsverzeichnis generieren, indem ein `subMaxLevel` gesetzt wird, vergleiche [sub-max-level Einstellungen](configuration.md#sub-max-level).
-
-```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/de-de/plugins.md b/docs/de-de/plugins.md
deleted file mode 100644
index e1fb43e..0000000
--- a/docs/de-de/plugins.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# Liste der Erweiterungen
-
-## Volltextsuche
-
-Als Standardeinstellung werden Hyperlinks auf der aktuellen Seite erkannt und der Inhalt in `localStorage` gespeichert. Du kannst den Pfad zu den Dateien auch anpassen:
-
-
-```html
-
-
-
-```
-
-## Google Analytics
-
-Installiere diese Erweiterung und passe die track id an:
-
-```html
-
-
-
-```
-
-Konfiguration über `data-ga`:
-
-```html
-
-
-```
-
-## front matter
-
-```html
-
-```
-
-## emoji
-
-Als Standardeinstellung werden emojis umgewandelt. Als Beispiel wird `:100:` umgewandelt in :100:. Aber das ist nicht genau, das es keine passende Nicht-emoji Zeichenfolge gibt. Solltest du emojis richtig umwandeln wollen, musst du diese Erweiterung verwenden.
-
-```html
-
-```
-
-## Externes Skript
-
-Wenn das Skript auf der Seite ein externes ist (eine Javascript Datei über das `src` Attribut importiert), brauchst du diese Erweiterung, damit das funktioniert.
-
-```html
-
-```
-
-## Bilder zoomen
-
-Medium's Bilderzoom. Basierend auf [zoom-image](https://github.com/egoist/zoom-image).
-
-```html
-
-```
diff --git a/docs/de-de/pwa.md b/docs/de-de/pwa.md
deleted file mode 100644
index 587547e..0000000
--- a/docs/de-de/pwa.md
+++ /dev/null
@@ -1,115 +0,0 @@
-# Offline Modus
-
-[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) (PWA) sind Erfahrungen die Vorzüge des Internets mit den Vorzügen von Apps verbinden. Wir können unsere Webseite verbessern, indem wir sie mit Hilfe von service workers auch **offline** und in schlechten Netzen interagierbar machen.
-
-Sie sind sehr einfach zu verwenden.
-
-## serviceWorker erstellen
-
-Erstelle eine Datei namens `sw.js` in deinem **docsify** Verzeichnis und kopiere folgenden 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 */ })
- )
- }
-})
-```
-
-## Registrieren
-
-Jetzt registrieren wir die Funktion in der Datei `index.html`. Nur manche aktuellen Browser unterstützen die Funktion, wir müssen also prüfen:
-
-*index.html*
-
-```html
-
-```
-
-## Geniessen
-
-Du kannst die Website jetzt veröffentlichen und Benutzer können sie dann vollständig offline verwenden, sobald sie einmal geladen wurde :ghost: Du kannst das jetzt ausprobieren, indem du deine Internetverbindung ausschaltest und diese Seite neu lädst.
diff --git a/docs/de-de/quickstart.md b/docs/de-de/quickstart.md
deleted file mode 100644
index ba2e067..0000000
--- a/docs/de-de/quickstart.md
+++ /dev/null
@@ -1,87 +0,0 @@
-# Schnellstart
-
-Es wird empfohlen, `docsify-cli` global zu installieren, welches bei der Inbetriebnahme und der lokalen Vorschau hilft.
-
-```bash
-npm i docsify-cli -g
-```
-
-## Inbetriebnahme
-
-Wenn du die Dokumentation in dem Unterordner `./docs` erstellen willst, kannst du den Befehl `init` verwenden.
-
-```bash
-docsify init ./docs
-```
-
-## Inhalt schreiben
-
-Nachdem der Befehl `init` vollständig ausgeführt wurde, kannst du folgende Dateien im Unterordner `./docs` finden:
-
-* `index.html` als zentrale Datei
-* `README.md` als die Startseite für die Dokumentation
-* `.nojekyll` verhindert, dass Github Pages Dateien ignoriert, die mit einem Unterstrich beginnen.
-
-Du kannst die Dokumentation über die Datei `./docs/README.md` nach Belieben ändern, und natürlich [weitere Seiten](de-de/more-pages.md) hinzufügen.
-
-## Vorschau der eigenen Seiten
-
-Du kannst einen lokalen Server mit dem Befehl `docsify serve` laufen lassen, und auf eine Vorschau deiner Webseite über `http://localhost:3000` zugreifen.
-
-```bash
-docsify serve docs
-```
-
-?> Für weitere Informationen hinsichtlich der Verwendung von `docsify-cli`, siehe [docsify-cli Dokumentation](https://github.com/QingWei-Li/docsify-cli).
-
-## Manuelle Inbetriebnahme
-
-Wenn du `npm` nicht verwenden möchtest, oder Probleme bei der Installation des Tools hast, kannst du auch manuell die Datei namens `index.html` erstellen:
-
-```html
-
-
-
-
-
- dict.
-
-
-
-
-
-
-
-```
-
-Solltest du Python installiert haben, kannst du einen statischen Server laufen lassen, um eine Vorschau deiner Webseite anzuschauen:
-
-```bash
-cd docs && python -m SimpleHTTPServer 3000
-```
-
-## Ladedialog
-
-Wenn du möchtest, kann **docsify** einen Ladedialog anzeigen, während es deine Dokumentation umwandelt:
-
-```html
-
-
-
Please wait...
-```
-
-Du solltest das `data-app` Attribut anpassen, wenn du `el` geändert hast:
-
-```html
-
-
-
Please wait...
-
-
-```
-
-Vergleiche [el Einstellungen](configuration.md#el).
diff --git a/docs/de-de/ssr.md b/docs/de-de/ssr.md
deleted file mode 100644
index c6e5f3a..0000000
--- a/docs/de-de/ssr.md
+++ /dev/null
@@ -1,123 +0,0 @@
-# Server client renderer
-
-See https://docsify.now.sh
-
-Repo in https://github.com/QingWei-Li/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 templte 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',
- 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: 'qingwei-li/docsify'
- }
-})
-
-renderer.renderToString(url)
- .then(html => {})
- .catch(err => {})
-```
diff --git a/docs/de-de/themes.md b/docs/de-de/themes.md
deleted file mode 100644
index bcfcd22..0000000
--- a/docs/de-de/themes.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Themes
-
-Es gibt im Moment vier Themes zur Auswahl, ähnlich wie die Webseiten von [Vue](//vuejs.org) oder [buble](//buble.surge.sh), sowie eine weitere, dunkle von [@liril-net](https://github.com/liril-net).
-
-```html
-
-
-
-
-```
-
-!> Komprimierte Dateien sind über `/lib/themes/` verfügbar.
-
-```html
-
-
-
-
-
-
-```
-
-Solltest du weitere Themes erstellen, kannst du sie gerne der Allgemeinheit mit einem [pull request](https://github.com/QingWei-Li/docsify/pulls) zur Verfügung stellen.
-
-#### Klicke hier für eine Vorschau
-
-
-
-
-
-
diff --git a/docs/de-de/vue.md b/docs/de-de/vue.md
deleted file mode 100644
index 2cfe49d..0000000
--- a/docs/de-de/vue.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# Kompatibel mit Vue
-
-Du kannst Vue Komponenten direkt in den Markdown Dateien verwenden, und sie werden umgewandelt. Du kannst dies zum Beispiel verwenden, um Vue Komponenten gleichzeitig zu demonstrieren und zu dokumentieren.
-
-## Einfache Verwendung
-
-Lade Vue in `./index.html`.
-
-```html
-
-
-
-
-
-
-```
-
-Dann kannst du sofort Vue Code in deinen Markdown Dateien verwenden. `new Vue({ el: '#main' })` wird als Standard ausgeführt, um Instanzen zu erschaffen.
-
-*README.md*
-
-```markdown
-# Vue guide
-
-`v-for` usage.
-
-```html
-
-
-
-```
-
-!> In Markdown Dateien wird nur das Skript innerhalb des ersten script tag Blocks ausgeführt.
-
-## Kombiniere Vuep um Demos zu erschaffen
-
-[Vuep](https://github.com/QingWei-Li/vuep) ist eine Komponente zur Darstellung von Vue Komponenten mit einem Liveeditor und einer Vorschau.Unterstützt die Vue Komponenten spec und JSX.
-
-*index.html*
-
-```html
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-*README.md*
-
-```markdown
-# Vuep
-
-
-
-
-
-```
-
-?> Zum Beispiel vergleich auch die [vuep Dokumentation](https://qingwei-li.github.io/vuep/).
diff --git a/docs/de-de/write-a-plugin.md b/docs/de-de/write-a-plugin.md
deleted file mode 100644
index b852ff0..0000000
--- a/docs/de-de/write-a-plugin.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# Schreiben einer Erweiterung
-
-Eine Erweiterung ist schlicht eine Funktion, welche `hook` als Argument nimmt. hook unterstützt dabei das Verwalten von asynchrononen Tasks.
-
-## Volle Konfiguration
-
-```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.
- })
- }
- ]
-}
-```
-
-!> Du kannst auf interne Methoden über `window.Docsify` zugreifen. Greife auf die aktuelle Instanz über das zweite Argument zu.
-
-## Beispiel
-
-### footer
-
-Füge jeder Seite eine footer Komponente hinzu:
-
-```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/QingWei-Li/docsify/blob/master/docs' + vm.route.file
- var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n'
-
- return editHtml
- + html
- + '\n----\n'
- + 'Last modified {docsify-updated} '
- + editHtml
- })
- }
- ]
-}
-```
\ No newline at end of file
diff --git a/docs/deploy.md b/docs/deploy.md
index 8641bb9..a879f2e 100644
--- a/docs/deploy.md
+++ b/docs/deploy.md
@@ -1,20 +1,62 @@
# Deploy
-Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pages or VPS.
+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
+- `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
@@ -26,8 +68,64 @@ server {
server_name your.domain.com;
location / {
- alias /path/to/dir/of/docs;
+ 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
new file mode 100644
index 0000000..dab2efe
--- /dev/null
+++ b/docs/embed-files.md
@@ -0,0 +1,81 @@
+# 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/helpers.md b/docs/helpers.md
index 7c64310..b047d36 100644
--- a/docs/helpers.md
+++ b/docs/helpers.md
@@ -19,12 +19,12 @@ is rendered as:
General tips like:
```markdown
-?> *TODO* unit test
+?> _TODO_ unit test
```
are rendered as:
-?> *TODO* unit test
+?> _TODO_ unit test
## Ignore to compile link
@@ -34,18 +34,18 @@ Some time we will put some other relative path to the link, you have to need to
[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")
+[link](/demo/ ':ignore')
```
+
You will get `link`html. Do not worry, you can still set title for link.
```md
-[link](/demo/ ":ignore title")
+[link](/demo/ ':ignore title')
link
```
@@ -53,7 +53,93 @@ You will get `link`html. Do not worry, you can still set ti
## Set target attribute for link
```md
-[link](/demo ":target=_blank")
-[link](/demo2 ":target=_self")
+[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
+