diff --git a/CHANGELOG.md b/CHANGELOG.md index 201854912..c83cf9096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,86 +1,79 @@ -3.4.0 / 2017-03-09 -================== +# 3.4.1 / 2017-03-10 - * feat(zoom-image): add plugin +* fix(dom): Disable the dom cache when vue is present, fixed [#119](https://github.com/QingWei-Li/docsify/issues/119) +* update english docs, [@jrappen](https://github.com/jrappen) -3.3.0 / 2017-03-07 -================== +# 3.4.0 / 2017-03-09 - * add front-matter plugin - * add external-script plugin - * Fix nav showing while loading (#112) - * Fix a typo (#111) - * Update changelog +* feat(zoom-image): add plugin -3.2.0 / 2017-02-28 -================== +# 3.3.0 / 2017-03-07 - * fix(render): Toc rendering error, fixed [#106](https://github.com/QingWei-Li/docsify/issues/106) - * feat(search): Localization for no data tip, close [#103](https://github.com/QingWei-Li/docsify/issues/103) - * fix(fetch): load sidebar and navbar for parent path, fixed [#100](https://github.com/QingWei-Li/docsify/issues/100) - * feat(render) nameLink for each route, fixed [#99](https://github.com/QingWei-Li/docsify/issues/99) +* add front-matter plugin +* add external-script plugin, [@Leopoldthecoder](https://github.com/Leopoldthecoder) +* Fix nav showing while loading ([#112](https://github.com/QingWei-Li/docsify/issues/112)) -3.1.2 / 2017-02-27 -================== +# 3.2.0 / 2017-02-28 - * fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102) +* fix(render): Toc rendering error, fixed [#106](https://github.com/QingWei-Li/docsify/issues/106) +* feat(search): Localization for no data tip, close [#103](https://github.com/QingWei-Li/docsify/issues/103) +* fix(fetch): load sidebar and navbar for parent path, fixed [#100](https://github.com/QingWei-Li/docsify/issues/100) +* feat(render) nameLink for each route, fixed [#99](https://github.com/QingWei-Li/docsify/issues/99) -3.1.1 / 2017-02-24 -================== +# 3.1.2 / 2017-02-27 - * fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102) - * fix(render): custom cover background image - * fix(tpl): extra character, fixed [#101](https://github.com/QingWei-Li/docsify/issues/101) +* fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102) -3.1.0 / 2017-02-22 -================== +# 3.1.1 / 2017-02-24 - * fix(search): incorrect anchor link, fixed [#90](https://github.com/QingWei-Li/docsify/issues/90) - * feat(emoji): add emoji plugin +* fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102) +* fix(render): custom cover background image +* fix(tpl): extra character, fixed [#101](https://github.com/QingWei-Li/docsify/issues/101) -3.0.5 / 2017-02-21 -================== +# 3.1.0 / 2017-02-22 - * feat(pwa): add sw.js - * fix(layout.css): loading style - * fix(event): highlight sidebar when clicked, fixed [#86](https://github.com/QingWei-Li/docsify/issues/86) - * fix(gen-tree): cache toc list, fixed [#88](https://github.com/QingWei-Li/docsify/issues/88) +* fix(search): incorrect anchor link, fixed [#90](https://github.com/QingWei-Li/docsify/issues/90) +* feat(emoji): add emoji plugin -3.0.4 / 2017-02-20 -================== +# 3.0.5 / 2017-02-21 - * fix(render): execute script - * fix(render): disable rendering sub list when loadSidebar is false +* feat(pwa): add sw.js +* fix(layout.css): loading style +* fix(event): highlight sidebar when clicked, fixed [#86](https://github.com/QingWei-Li/docsify/issues/86) +* fix(gen-tree): cache toc list, fixed [#88](https://github.com/QingWei-Li/docsify/issues/88) -3.0.3 / 2017-02-19 -================== +# 3.0.4 / 2017-02-20 - * fixed look of links in blockquote - * fix(scroll) highlight bug +* fix(render): execute script +* fix(render): disable rendering sub list when loadSidebar is false -3.0.2 / 2017-02-19 -================== +# 3.0.3 / 2017-02-19 - * fix(search): add lazy input - * fix(compiler): link +* fixed look of links in blockquote +* fix(scroll) highlight bug -3.0.1 / 2017-02-19 -================== +# 3.0.2 / 2017-02-19 - * fix(route): empty alias +* fix(search): add lazy input +* fix(compiler): link -3.0.0 / 2017-02-19 -================== +# 3.0.1 / 2017-02-19 + +* fix(route): empty alias + +# 3.0.0 / 2017-02-19 #### Breaking change -- Not support IE9 -- The route becomes: `/#/page?id=slug`. The previous route will be redirected + +* Not support IE9 +* The route becomes: `/#/page?id=slug`. The previous route will be redirected #### Features -- Faster rendering -- Clearer source code -- More powerful API -- Auto header for each page [#78](https://github.com/QingWei-Li/docsify/issues/78) -- Localization for search plugin [#80](https://github.com/QingWei-Li/docsify/issues/80) -- Execute the script in markdown (see `executeScript`) + +* Faster rendering +* Clearer source code +* More powerful API +* Auto header for each page [#78](https://github.com/QingWei-Li/docsify/issues/78) +* Localization for search plugin [#80](https://github.com/QingWei-Li/docsify/issues/80) +* Execute the script in markdown (see `executeScript`) diff --git a/HISTORY.md b/HISTORY.md index 6c9358eee..77331edd5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,22 +3,24 @@ > 2017-02-15 #### Bug fixes -* fix emoji replacing error (#76) + +* fix emoji replacing error ([#76](https://github.com/QingWei-Li/docsify/issues/76)) ### 2.4.2 > 2017-02-14 #### Bug fixes -- fix(index): load file path error +* fix(index): load file path error ### 2.4.1 > 2017-02-13 #### Bug fixes -- fix(index): cover page + +* fix(index): cover page ### 2.4.0 @@ -26,8 +28,7 @@ #### Features -- feat(hook): add `doneEach` - +* feat(hook): add `doneEach` ### 2.3.0 @@ -35,352 +36,477 @@ #### Features -- feat(src): add alias feature -- docs: update all documents -- feat(src): dynamic title -- feat(hook): support custom plugin -- feat(themes): add dark theme +* feat(src): add alias feature +* docs: update all documents +* feat(src): dynamic title +* feat(hook): support custom plugin +* feat(themes): add dark theme #### Bug fixes -- fix(event): `auto2top` has no effect on a FF mobile browser, fixed #67 -- fix: sidebar style -- fix(render): fix render link + +* fix(event): `auto2top` has no effect on a FF mobile browser, fixed #67 +* fix: sidebar style +* fix(render): fix render link ### 2.2.1 > 2017-02-11 #### Bug fixes -- fix(search): crash when not content, fixed #68 -- fix(event): scroll active sidebar -- fix(search): not work in mobile + +* fix(search): crash when not content, fixed [#68](https://github.com/QingWei-Li/docsify/issues/68) +* fix(event): scroll active sidebar +* fix(search): not work in mobile ### 2.2.0 #### Features -- Add `Google Analytics` plugin. -```html - - -``` + +* Add `Google Analytics` plugin. + ```html + + + ``` ### 2.1.0 + #### Features -- Add search plugin -```html - - -``` + +* Add search plugin + ```html + + + ``` #### Bug fixes -- fix sidebar style + +* fix sidebar style ### 2.0.3 + #### Bug fixes -- fix: rendering emojis -- fix: css var polyfill + +* fix: rendering emojis +* fix: css var polyfill ### 2.0.2 #### Bug fixes -- fix button style in cover page. + +* fix button style in cover page. ### 2.0.1 + #### Bug fixes -- border style. + +* border style. ### 2.0.0 + #### Features -- Customize the theme color + +* Customize the theme color #### Break change -- Remove `data-router`, `data-sidebar`, `data-sidebar-toggle` APIs + +* Remove `data-router`, `data-sidebar`, `data-sidebar-toggle` APIs ### 1.10.5 + #### Bug fixes -- fix initialize the Vue instance + +* fix initialize the Vue instance ### 1.10.4 + #### Bug fixes -- fix execute script + +* fix execute script ### 1.10.3 + #### Bug fixes -- compatible vuep QingWei-Li/vuep/issues/2 -- fix sidebar scroll, fixed #63 + +* compatible vuep ([#2](https://github.com/QingWei-Li/vuep/issues/2)) +* fix sidebar scroll, fixed [#63](https://github.com/QingWei-Li/docsify/issues/63) ### 1.10.2 + #### Bug fixes -- Fix render emojis again + +* Fix render emojis again ### 1.10.1 + #### Bug fixes -- Fix render emojis + +* Fix render emojis ### 1.10.0 + #### Features -- Support emoji :laughing: + +* Support emoji :laughing: ### 1.9.0 #### Bug fixes -- Destroys the vue instance when the route is changed + +* Destroys the vue instance when the route is changed #### Features -- Add `!>` and `?>` doc helper. + +* Add `!>` and `?>` doc helper. #### Break change -- Remove `!` doc helper. + +* Remove `!` doc helper. ### 1.8.0 + #### Bug fixes -- Using `v-pre` skip compilation. + +* Using `v-pre` skip compilation. ### Features -- Execute script when vue exists. + +* Execute script when vue exists. ### 1.7.4 + #### Bug fixes -- Fix bugs caused by the previous version + +* Fix bugs caused by the previous version ### 1.7.3 + #### Bug fixes -- Add `hr` style -- Fixed option is an empty string + +* Add `hr` style +* Fixed option is an empty string ### 1.7.2 + #### Bug fixes -- Fix sidebar click event in mobile browser. + +* Fix sidebar click event in mobile browser. ### 1.7.1 + #### Bug fixes -- Fix sidebar style in mobile browser. + +* Fix sidebar style in mobile browser. ### 1.7.0 #### Bug fixes -- Fixed custom cover background, fixed #52 -- Fixed sticky sidebar + +* Fixed custom cover background, fixed [#52](https://github.com/QingWei-Li/docsify/issues/52) +* Fixed sticky sidebar ### Features -- Add `name` and `nameLink` + +* Add `name` and `nameLink` ### 1.6.1 + #### Bug fixes -- Fixed sidebar bug when the coverpage exist + +* Fixed sidebar bug when the coverpage exist ### 1.6.0 + #### Features -- Improve sidebar performance. The active item is automatically scrolled in the visible view. -- New doc helper: `! `. e.g. `! content` will be rendered as `
content
` + +* Improve sidebar performance. The active item is automatically scrolled in the visible view. +* New doc helper: `! `. e.g. `! content` will be rendered as `content
` ### 1.5.2 + #### Bug fixes -- Fixed number at the beginning of the slug + +* Fixed number at the beginning of the slug ### 1.5.1 + #### Bug fixes -- Remove HTML tag when handling slug + +* Remove HTML tag when handling slug ### 1.5.0 #### Bug fixes -- Fix slugify. -- Fix nav highlight. + +* Fix slugify. +* Fix nav highlight. #### Features -- Initialize the configuration by `window.$docsify`. -- Markdown parser is configurable. + +* Initialize the configuration by `window.$docsify`. +* Markdown parser is configurable. ### 1.4.3 + #### Bug fixes -- Tweak style. + +* Tweak style. ### 1.4.2 #### Bug fixes -- Fix toggle button style. -- Support `mailto`, `tel`, etc. href type -- Fix scroll to top. +* Fix toggle button style. +* Support `mailto`, `tel`, etc. href type +* Fix scroll to top. ### 1.4.1 + #### Bug fixes -- Fix generate slug. + +* Fix generate slug. ### 1.4.0 Happly new year 🎉 + #### Features -- Display TOC in the custom sidebar, `data-sub-max-level`. -- Custom background in coverpage. + +* Display TOC in the custom sidebar, `data-sub-max-level`. +* Custom background in coverpage. #### Bug fixes -- Fix scroll highlight when Vue exist. + +* Fix scroll highlight when Vue exist. ### 1.3.5 + #### Bug fixes -- Fix vue + +* Fix vue ### 1.3.4 + #### Bug fixes -- Supports [vuep](https://github.com/QingWei-Li/vuep) +* Supports [vuep](https://github.com/QingWei-Li/vuep) ### 1.3.3 + #### Bug fixes -- Fixed cover rendering timing + +* Fixed cover rendering timing ### 1.3.2 #### Bug fixes -- Fixed render link + +* Fixed render link ### 1.3.1 #### Bug fixes -- Fixed cover page style -- Generate the correct link when rendering the article + +* Fixed cover page style +* Generate the correct link when rendering the article ### 1.3.0 + #### Features -- Add cover page -- add `` style -- headling can be cliked + +* Add cover page +* add `` style +* headling can be cliked #### Bug fixes -- sidebar highlight +* sidebar highlight #### break change -- Navbar no longer fixed at the top + +* Navbar no longer fixed at the top ### 1.2.0 + #### Features -- custom basePath -- custom homepage + +* custom basePath +* custom homepage ### 1.1.7 + #### Bug fixes -- Optimize progress bar + +* Optimize progress bar ### 1.1.6 + #### Features -- Add logo 😂 + +* Add logo 😂 #### Bug fixes -- Remove table background color -- Fixed highlight sidebar using chinese ids + +* Remove table background color +* Fixed highlight sidebar using chinese ids ### 1.1.5 + #### Features + - Add table style #### Bug fixes -- Not fixed position of hte navbar in the mobile browser -- Correct calculation of whether the mobile browser + +* Not fixed position of hte navbar in the mobile browser +* Correct calculation of whether the mobile browser ### 1.1.4 + #### Bug fixes -- Fixed chinese auchor link + +* Fixed chinese auchor link ### 1.1.3 + #### Bug fixes -- Optimize progress bar again + +* Optimize progress bar again ### 1.1.2 + #### Bug fixes -- fix failed `auto2top` in mobile + +* fix failed `auto2top` in mobile ### 1.1.1 + #### Bug fixes + - Optimize progress bar ### 1.1.0 + #### Features -- Add progress bar -- Add `auto2top` option for hash router + +* Add progress bar +* Add `auto2top` option for hash router ### 1.0.3 + #### Bug fixes + - Fix cache ### 1.0.2 + #### Bug fixes -- Fix binding events bug, fixed #24 -- Fix regular expression, fixed #23 + +* Fix binding events bug, fixed [#24](https://github.com/QingWei-Li/docsify/issues/24) +* Fix regular expression, fixed [#23](https://github.com/QingWei-Li/docsify/issues/23) ### 1.0.1 + #### Bug fixes -- `img` style + +* `img` style ### 1.0.0 + #### Features -- Support hash router + +* Support hash router #### Bug fixes -- Improved scrolling on mobile + +* Improved scrolling on mobile ### 0.7.0 + #### Breaking change -- `themes/` was removed, only exists in the npm package. + +* `themes/` was removed, only exists in the npm package. #### Bug fixes -- Fix style. -- Fix sidebar animation again. + +* Fix style. +* Fix sidebar animation again. ### 0.6.1 + #### Bug fixes -- In the mobile, it should collapse the sidebar when toggle is clicked. -- Fix the dropdown list style. -- Fix sidebar animation. + +* In the mobile, it should collapse the sidebar when toggle is clicked. +* Fix the dropdown list style. +* Fix sidebar animation. ### 0.6.0 + #### Features -- Navbar support dropdown list, #6 -- Sidebar with toggle + +* Navbar support dropdown list, [#6](https://github.com/QingWei-Li/docsify/issues/6) +* Sidebar with toggle #### Bug fixes -- Fix ineffective option, fixed #10 + +* Fix ineffective option, fixed [#10](https://github.com/QingWei-Li/docsify/issues/10) ### 0.5.0 + #### Features -- Custom sidebars and navbars by markdown file + +* Custom sidebars and navbars by markdown file ### 0.4.2 + #### Bug fixes -- Correct catch ajax error + +* Correct catch ajax error ### 0.4.1 + #### Bug fixes -- catch ajax error + +* catch ajax error ### 0.4.0 + #### Features -- Custom sidebar + +* Custom sidebar #### Bug fixes -- Fix undefined language + +* Fix undefined language ### 0.3.1 + #### Bug fixes -- Strip HTML tag when rendering the headings + +* Strip HTML tag when rendering the headings ### 0.3.0 + #### Features -- Add minified css files -- Add max level option -- Add pure.css + +* Add minified css files +* Add max level option +* Add pure.css ### 0.2.1 + #### Bug fixes -- Fix vue.css + +* Fix vue.css ### 0.2.0 + #### Bug fixes -- Fix route -- Remove dynamic title + +* Fix route +* Remove dynamic title ### 0.1.0 + #### Features -- Add buble.css \ No newline at end of file + +* Add buble.css diff --git a/README.md b/README.md index b86951159..6b722a62d 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ ## Links + - [Documentation](https://docsify.js.org) - [CLI](https://github.com/QingWei-Li/docsify-cli) @@ -28,7 +29,8 @@ - Compatible with IE10+ ## Quick start -Create a `index.html`. + +Create an `index.html`. ```html @@ -51,18 +53,24 @@ Create a `index.html`. Modern browsers and Internet Explorer 10+. ## Showcase + These open-source projects are using docsify to generate their sites. Pull requests welcome :blush: -- [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 +| 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 | ## Similar projects -- [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 @@ -81,4 +89,5 @@ open http://localhost:3000 ``` ## License + MIT diff --git a/docs/README.md b/docs/README.md index 4d407d77d..1873d46c1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,13 +10,13 @@ See the [Quick start](/quickstart) for more details. ## Features -- No statically built html files -- Simple and lightweight (~16kB gzipped) -- Smart full-text search plugin -- Multiple themes -- Useful plugin API -- Emoji support -- Compatible with IE10+ +* No statically built html files +* Simple and lightweight (~16kB gzipped) +* Smart full-text search plugin +* Multiple themes +* Useful plugin API +* Emoji support +* Compatible with IE10+ ## Examples diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 9d1885b79..c41ac66ae 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,8 +1,8 @@ - Getting started - - [Quick start](/quickstart) - - [Writing more pages](/more-pages) - - [Custom navbar](/custom-navbar) - - [Cover page](/cover) + - [Quick start](/quickstart) + - [Writing more pages](/more-pages) + - [Custom navbar](/custom-navbar) + - [Cover page](/cover) - Customization - [Configuration](/configuration) @@ -13,10 +13,10 @@ - [Language highlighting](/language-highlight) - Guide - - [Deploy](/deploy) - - [Helpers](/helpers) - - [Vue compatibility](/vue) - - [CDN](/cdn) - - [Offline Mode(PWA)](/pwa) + - [Deploy](/deploy) + - [Helpers](/helpers) + - [Vue compatibility](/vue) + - [CDN](/cdn) + - [Offline Mode(PWA)](/pwa) -- [Changelog](/changelog) \ No newline at end of file +- [Changelog](/changelog) diff --git a/docs/cdn.md b/docs/cdn.md index 1e0b2ec8a..63f318ba5 100644 --- a/docs/cdn.md +++ b/docs/cdn.md @@ -2,10 +2,8 @@ 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 @@ -14,8 +12,9 @@ Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon ``` -## Specific version +Alternatively, use [compressed files](#compressed-files). +## Specific version ```html @@ -27,7 +26,6 @@ Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon ## Compressed file - ```html @@ -36,7 +34,14 @@ Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon ``` +```html + + + + + +``` + ## Other CDN [jsDelivr](http://www.jsdelivr.com/projects/docsify) is available. - diff --git a/docs/configuration.md b/docs/configuration.md index c418aaf6e..f5880f0ae 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,6 @@ # Configuration -docsify supports two ways to configure. You can configure the `window.$docsify` or write configuration on the script tag via `data-*` attributes. +**docsify** supports two different ways of configuration. You can configure the `window.$docsify` or write configuration on the script tag via `data-*` attributes. ```html @@ -53,7 +53,6 @@ window.$docsify = { } ``` - ## max-level - Type: `Number` @@ -72,7 +71,7 @@ window.$docsify = { - Type: `Boolean|String` - Default: `false` -Load navbar from Markdown file. If **true** it will be loaded from `_navbar.md`. +Loads navbar from the Markdown file `_navbar.md` if **true**, or else from the path specified. ```js window.$docsify = { @@ -89,8 +88,7 @@ window.$docsify = { - Type: `Boolean|String` - Default: `false` - -Load sidebar from Markdown file. If **true** it will be loaded from `_sidebar.md`. +Loads sidebar from the Markdown file `_sidebar.md` if **true**, or else from the path specified. ```js window.$docsify = { @@ -107,7 +105,7 @@ window.$docsify = { - Type: `Number` - Default: `0` -Add TOC in custom sidebar. +Add table of contents (TOC) in custom sidebar. ```js window.$docsify = { @@ -115,13 +113,11 @@ window.$docsify = { } ``` - ## auto2top - Type: `Boolean` - Default: `false` - Scrolls to the top of the screen when the route is changed. ```js @@ -130,13 +126,11 @@ window.$docsify = { } ``` - ## 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 @@ -167,7 +161,6 @@ window.$docsify = { } ``` - ## coverpage - Type: `Boolean|String` @@ -188,8 +181,7 @@ window.$docsify = { - Type: `String` - -Website name appears in the sidebar. +Website name as it appears in the sidebar. ```js window.$docsify = { @@ -222,7 +214,6 @@ window.$docsify = { See [Markdown configuration](/markdown). - ```js window.$docsify = { // object @@ -247,8 +238,7 @@ window.$docsify = { - 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. +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 = { @@ -260,7 +250,6 @@ window.$docsify = { - Type: `Object` - Set the route alias. You can freely manage routing rules. ```js @@ -276,7 +265,7 @@ window.$docsify = { - 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. [#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/QingWei-Li/docsify/issues/78). ```js window.$docsify = { @@ -303,7 +292,6 @@ 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?id=external-script) plugin. diff --git a/docs/cover.md b/docs/cover.md index 87bd4951e..4d7a4eaf9 100644 --- a/docs/cover.md +++ b/docs/cover.md @@ -1,6 +1,6 @@ # Cover -Activate the cover feature by setting `coverpage` to **true**. Details are available in the [coverpage configuration paragraph](configuration#coverpage). +Activate the cover feature by setting `coverpage` to **true**, compare [coverpage configuration](configuration#coverpage). ## Basic usage @@ -14,16 +14,15 @@ Set `coverpage` to **true**, and create a `_coverpage.md`: coverpage: true } - + ``` - ```markdown  -# docsify 3.0 +# docsify 3.5 > A magical documentation site generator. @@ -31,27 +30,27 @@ Set `coverpage` to **true**, and create a `_coverpage.md`: - No statically built html files - Multiple themes - [GitHub](https://github.com/QingWei-Li/docsify/) [Get Started](#docsify) ``` -!> A document site can have only one cover page. +!> 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 image: +The background color is generated randomly by default. You can customize the background color or a background image: ```markdown -# docsify +# docsify 3.5 [GitHub](https://github.com/QingWei-Li/docsify/) [Get Started](#quick-start)  +  ``` diff --git a/docs/custom-navbar.md b/docs/custom-navbar.md index ed7553998..5c436bea9 100644 --- a/docs/custom-navbar.md +++ b/docs/custom-navbar.md @@ -2,7 +2,9 @@ ## HTML -If you need custom navigation, you can create a HTML-based navigation bar (but note that documentation links begin with `#/`). +If you need custom navigation, you can create a HTML-based navigation bar. + +!> Note that documentation links begin with `#/`. ```html @@ -18,7 +20,7 @@ If you need custom navigation, you can create a HTML-based navigation bar (but n ## Markdown -Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`. Details are available in the [load-navbar configuration paragraph](configuration#load-navbar). +Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`, compare [load-navbar configuration](configuration#load-navbar). ```html @@ -28,10 +30,9 @@ Alternatively, you can create a custom markdown-based navigation file by setting loadNavbar: true } - + ``` - ```markdown @@ -51,10 +52,10 @@ You can create sub-lists by indenting items that are under a certain parent. - Getting started - - [Quick start](/quickstart) - - [Writing more pages](/more-pages) - - [Custom navbar](/custom-navbar) - - [Cover page](/cover) + - [Quick start](/quickstart) + - [Writing more pages](/more-pages) + - [Custom navbar](/custom-navbar) + - [Cover page](/cover) - Configuration - [Configuration](/configuration) @@ -68,4 +69,27 @@ 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 index ed25b0281..8641bb902 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -1,16 +1,16 @@ # Deploy -As as GitBook, you can deploy files to GitHub Pages or VPS. +Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pages or VPS. ## GitHub Pages -There're three places to populate your docs +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 -You can save your files in `./docs` and setting `master branch /docs folder`. +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.  diff --git a/docs/helpers.md b/docs/helpers.md index 85a7035cc..fe636b2ec 100644 --- a/docs/helpers.md +++ b/docs/helpers.md @@ -4,23 +4,24 @@ docsify extends Markdown syntax to make your documents more readable. ## important content -Suitable for displaying important information. +Important content like: ```markdown !> **Time** is money, my friend! ``` -!> **Time** is money, my friend! +is rendered as: +!> **Time** is money, my friend! ## General tips -General tips. - +General tips like: ```markdown ?> *TODO* unit test ``` -?> *TODO* unit test +are rendered as: +?> *TODO* unit test diff --git a/docs/language-highlight.md b/docs/language-highlight.md index 22a5700c7..2bd8a3ccc 100644 --- a/docs/language-highlight.md +++ b/docs/language-highlight.md @@ -1,13 +1,11 @@ # language highlight - -The code language highlight tool is [Prism](https://github.com/PrismJS/prism). Only supports CSS, JavaScipt and HTML by default. You can load its component to highlight the language you need. - +**docsify** uses [Prism](https://github.com/PrismJS/prism) to highlight code blocks in your pages. By default it only supports CSS, JavaScipt and HTML. You can make **Prism** load additional languages: ```html - - - + + + ``` -?> See fully supported highlight component [files list](https://github.com/PrismJS/prism/tree/gh-pages/components). +?> Check the [component files](https://github.com/PrismJS/prism/tree/gh-pages/components) list for more options. diff --git a/docs/markdown.md b/docs/markdown.md index a45f188b0..a50411a3f 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -1,6 +1,6 @@ # Markdown configuration -The Markdown parser is [marked](https://github.com/chjj/marked). You can customize how docsify renders your Markdown content to HTML. Support customize `renderer`. +**docsify** uses [marked](https://github.com/chjj/marked) as its Markdown parser. You can customize how it renders your Markdown content to HTML by customizing `renderer`: ```js window.$docsify = { diff --git a/docs/more-pages.md b/docs/more-pages.md index 706866871..59ceb33de 100644 --- a/docs/more-pages.md +++ b/docs/more-pages.md @@ -16,7 +16,6 @@ For example, the directory structure is as follows: Matching routes - ```text docs/README.md => http://domain.com docs/guide.md => http://domain.com/guide @@ -38,7 +37,7 @@ First, you need to set `loadSidebar` to **true**. Details are available in the [ loadSidebar: true } - + ``` Create the `_sidebar.md`: @@ -56,7 +55,7 @@ Create the `_sidebar.md`: ## Table of Contents -A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`. Details are available in the [max-level configuration paragraph](configuration#sub-max-level). +A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`, compare [sub-max-level configuration](configuration#sub-max-level). ```html @@ -67,5 +66,5 @@ A custom sidebar can also automatically generate a table of contents by setting subMaxLevel: 2 } - + ``` diff --git a/docs/plugins.md b/docs/plugins.md index 8c5f8bcd6..225a684fa 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -17,7 +17,7 @@ By default, the hyperlink on the current page is recognized and the content is s '/zh-cn/', // => /zh-cn/README.md ], - // 完整配置参数 + // complete configuration parameters search: { maxAge: 86400000, // Expiration time, the default one day paths: [], // or 'auto' @@ -39,11 +39,10 @@ By default, the hyperlink on the current page is recognized and the content is s } } - - + + ``` - ## Google Analytics Install the plugin and configure the track id. @@ -54,25 +53,29 @@ Install the plugin and configure the track id. ga: 'UA-XXXXX-Y' } - - + + ``` Configure by `data-ga`. +```html + + +``` + +## front matter ```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 @@ -80,7 +83,7 @@ The default is to support parsing emoji. For example `:100:` will be parsed to : 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 @@ -88,5 +91,5 @@ If the script on the page is an external one (imports a js file via `src` attrib Medium's Image Zoom. Based on [zoom-image](https://github.com/egoist/zoom-image). ```html - + ``` diff --git a/docs/pwa.md b/docs/pwa.md index 7cf0200fa..e8d1c74dc 100644 --- a/docs/pwa.md +++ b/docs/pwa.md @@ -1,10 +1,12 @@ # Offline Mode -[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/)(PWA) are experiences that combine the best of the web and the best of apps. we can enhance our website with service workers to work **offline** or on low-quality networks. +[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 this code. + +Create a `sw.js` file in your documents root directory and copy the following code: *sw.js* @@ -96,7 +98,7 @@ self.addEventListener('fetch', event => { ## Register -Now, register it in your `index.html`. It only works on some modern browsers, so we need to judge. +Now, register it in your `index.html`. It only works on some modern browsers, so we need to judge: *index.html* diff --git a/docs/quickstart.md b/docs/quickstart.md index 845ea184e..7e3df3902 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -8,7 +8,7 @@ npm i docsify-cli -g ## Initialize -If you want to write the documentation in the `./docs` directory, you can use the `init` command. +If you want to write the documentation in the `./docs` subdirectory, you can use the `init` command. ```bash docsify init ./docs @@ -16,20 +16,18 @@ docsify init ./docs ## Writing content -After the init is complete, you can see the file list in the docs directory. +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 -- `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). +You can easily update the documentation in `./docs/README.md`, of course you can add [more pages](more-pages). ## 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 ``` @@ -38,7 +36,7 @@ docsify serve docs ## Manual initialization -If you don't like npm or have trouble installing the tool, you can manually create `index.html`: +If you don't like `npm` or have trouble installing the tool, you can manually create `index.html`: ```html @@ -52,7 +50,7 @@ If you don't like npm or have trouble installing the tool, you can manually crea - +