mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 13:26:34 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b37781e949 | ||
|
|
54a48dd3ff | ||
|
|
1aabc41db7 | ||
|
|
d087d5753b | ||
|
|
bb793ec08e | ||
|
|
6a78ae7ddc | ||
|
|
ac28040bd7 | ||
|
|
b12f74b159 | ||
|
|
1304d2ea1a | ||
|
|
ccf4c7c5cc | ||
|
|
9b15d8d577 |
+13
-4
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
4.1.12 / 2017-06-03
|
||||
|
||||
* fix(render): ubtitle in side bar shows undefined, fixed [#182](https://github.com/QingWei-Li/docsify/issues/182)
|
||||
|
||||
4.1.11 / 2017-06-02
|
||||
|
||||
* fix(render): autoHeader does not work
|
||||
* fix(compiler): force reset toc when rendering sidebar fixed [#181](https://github.com/QingWei-Li/docsify/issues/181)
|
||||
|
||||
4.1.10 / 2017-06-02
|
||||
|
||||
* fix(hash): hash routing crashes when url has querystring
|
||||
@@ -7,13 +16,13 @@
|
||||
4.1.9 / 2017-05-31
|
||||
|
||||
* fix(lifecycle): continue to handle data
|
||||
* fix: can't render toc on first load, fixed #171
|
||||
* fix(render): broken name link, fixed #167
|
||||
* fix: can't render toc on first load, fixed [#171](https://github.com/QingWei-Li/docsify/issues/171)
|
||||
* fix(render): broken name link, fixed [#167](https://github.com/QingWei-Li/docsify/issues/167)
|
||||
|
||||
## 4.1.8(since 4.1.1) / 2017-05-31
|
||||
|
||||
* fix(pure-css):add coverpage style, fixed #165
|
||||
* feat: add edit button demo, close #162
|
||||
* fix(pure-css):add coverpage style, fixed [#165](https://github.com/QingWei-Li/docsify/issues/165)
|
||||
* feat: add edit button demo, close [#162](https://github.com/QingWei-Li/docsify/issues/162)
|
||||
* fix some ssr bugs
|
||||
|
||||
## 4.1.0 / 2017-05-30 🎂 to me
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
## Features
|
||||
|
||||
- No statically built html files
|
||||
- Simple and lightweight (~16kB gzipped)
|
||||
- Simple and lightweight (~18kB gzipped)
|
||||
- Smart full-text search plugin
|
||||
- Multiple themes
|
||||
- Useful plugin API
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
loadSidebar: true,
|
||||
coverpage: true,
|
||||
name: 'docsify',
|
||||
subMaxLevel: 2,
|
||||
subMaxLevel: 0,
|
||||
mergeNavbar: true,
|
||||
formatUpdated: '{MM}/{DD} {HH}:{mm}',
|
||||
routerMode: 'history',
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ See the [Quick start](quickstart.md) for more details.
|
||||
## Features
|
||||
|
||||
* No statically built html files
|
||||
* Simple and lightweight (~16kB gzipped)
|
||||
* Simple and lightweight (~18kB gzipped)
|
||||
* Smart full-text search plugin
|
||||
* Multiple themes
|
||||
* Useful plugin API
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||

|
||||
|
||||
# docsify <small>4.1.10</small>
|
||||
# docsify <small>4.1.12</small>
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
- Simple and lightweight (~16kB gzipped)
|
||||
- Simple and lightweight (~18kB gzipped)
|
||||
- No statically built html files
|
||||
- Multiple themes
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
- Simple and lightweight (~16kB gzipped)
|
||||
- Simple and lightweight (~18kB gzipped)
|
||||
- No statically built html files
|
||||
- Multiple themes
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Siehe [Schnellstart](de-de/quickstart.md) für weitere Informationen.
|
||||
## Features
|
||||
|
||||
* keine generierten, statischen HTML Dateien
|
||||
* einfach und klein (~16kB gzipped)
|
||||
* einfach und klein (~18kB gzipped)
|
||||
* smarte Erweiterung mit Volltextsuche
|
||||
* mehrere Themes
|
||||
* praktische API für Erweiterungen
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ Setze `coverpage` auf **true**, und erstelle `_coverpage.md`:
|
||||
|
||||
> Ein magischer Generator für Dokumentationsseiten.
|
||||
|
||||
- Einfach und wenig Speicherbedarf (~16kB gzipped)
|
||||
- Einfach und wenig Speicherbedarf (~18kB gzipped)
|
||||
- Keine statischen HTML Dateien
|
||||
- Mehrere Themes
|
||||
|
||||
|
||||
+6
-6
@@ -7,10 +7,10 @@
|
||||
<meta name="keywords" content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages">
|
||||
<meta name="description" content="A magical documentation generator.">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css" title="vue">
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/dark.css" title="dark" disabled>
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/buble.css" title="buble" disabled>
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/pure.css" title="pure" disabled>
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@latest/lib/themes/vue.css" title="vue">
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@latest/lib/themes/dark.css" title="dark" disabled>
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@latest/lib/themes/buble.css" title="buble" disabled>
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@latest/lib/themes/pure.css" title="pure" disabled>
|
||||
<style>
|
||||
nav.app-nav li ul {
|
||||
min-width: 100px;
|
||||
@@ -66,8 +66,8 @@
|
||||
]
|
||||
}
|
||||
</script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify@latest/lib/docsify.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify@latest/lib/plugins/search.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-markdown.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-nginx.min.js"></script>
|
||||
|
||||
@@ -12,7 +12,7 @@ docsify 是一个动态生成文档网站的工具。不同于 GitBook、Hexo
|
||||
|
||||
## 特性
|
||||
- 无需构建,写完文档直接发布
|
||||
- 容易使用并且轻量 (~16kB gzipped)
|
||||
- 容易使用并且轻量 (~18kB gzipped)
|
||||
- 智能的全文搜索
|
||||
- 提供多套主题
|
||||
- 丰富的 API
|
||||
|
||||
+10
-3
@@ -2889,6 +2889,10 @@ Compiler.prototype.sidebar = function sidebar (text, level) {
|
||||
* Compile sub sidebar
|
||||
*/
|
||||
Compiler.prototype.subSidebar = function subSidebar (level) {
|
||||
if (!level) {
|
||||
this.toc = [];
|
||||
return
|
||||
}
|
||||
var currentPath = this.router.getCurrentPath();
|
||||
var ref = this;
|
||||
var cacheTree = ref.cacheTree;
|
||||
@@ -3158,10 +3162,13 @@ function renderMixin (proto) {
|
||||
this._renderTo('.sidebar-nav', this.compiler.sidebar(text, maxLevel));
|
||||
var activeEl = getAndActive(this.router, '.sidebar-nav', true, true);
|
||||
if (loadSidebar && activeEl) {
|
||||
activeEl.parentNode.innerHTML += this.compiler.subSidebar(subMaxLevel);
|
||||
activeEl.parentNode.innerHTML += (this.compiler.subSidebar(subMaxLevel) || '');
|
||||
} else {
|
||||
// reset toc
|
||||
this.compiler.subSidebar();
|
||||
}
|
||||
// bind event
|
||||
this._bindEventOnRendered();
|
||||
this._bindEventOnRendered(activeEl);
|
||||
};
|
||||
|
||||
proto._bindEventOnRendered = function (activeEl) {
|
||||
@@ -3743,7 +3750,7 @@ initGlobalAPI();
|
||||
/**
|
||||
* Version
|
||||
*/
|
||||
Docsify.version = '4.1.10';
|
||||
Docsify.version = '4.1.12';
|
||||
|
||||
/**
|
||||
* Run Docsify
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify",
|
||||
"version": "4.1.10",
|
||||
"version": "4.1.12",
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"abbrev": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify",
|
||||
"version": "4.1.10",
|
||||
"version": "4.1.12",
|
||||
"description": "A magical documentation generator.",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify-server-renderer",
|
||||
"version": "4.1.10",
|
||||
"version": "4.1.12",
|
||||
"description": "docsify server renderer",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
|
||||
@@ -135,6 +135,10 @@ export class Compiler {
|
||||
* Compile sub sidebar
|
||||
*/
|
||||
subSidebar (level) {
|
||||
if (!level) {
|
||||
this.toc = []
|
||||
return
|
||||
}
|
||||
const currentPath = this.router.getCurrentPath()
|
||||
const { cacheTree, toc } = this
|
||||
|
||||
|
||||
@@ -84,10 +84,13 @@ export function renderMixin (proto) {
|
||||
this._renderTo('.sidebar-nav', this.compiler.sidebar(text, maxLevel))
|
||||
const activeEl = getAndActive(this.router, '.sidebar-nav', true, true)
|
||||
if (loadSidebar && activeEl) {
|
||||
activeEl.parentNode.innerHTML += this.compiler.subSidebar(subMaxLevel)
|
||||
activeEl.parentNode.innerHTML += (this.compiler.subSidebar(subMaxLevel) || '')
|
||||
} else {
|
||||
// reset toc
|
||||
this.compiler.subSidebar()
|
||||
}
|
||||
// bind event
|
||||
this._bindEventOnRendered()
|
||||
this._bindEventOnRendered(activeEl)
|
||||
}
|
||||
|
||||
proto._bindEventOnRendered = function (activeEl) {
|
||||
|
||||
Reference in New Issue
Block a user