mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-11 06:16:10 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6540e7370d | ||
|
|
f3853d8e7f | ||
|
|
93ddf08615 | ||
|
|
7c05d729b4 | ||
|
|
5953ef7739 | ||
|
|
d556282471 | ||
|
|
ec58149aad | ||
|
|
e15c53a6b8 | ||
|
|
f450b118ee | ||
|
|
6ac7d4f66f |
@@ -0,0 +1,37 @@
|
||||
## 0.4.2
|
||||
## Bug fixes
|
||||
- Correct catch ajax error
|
||||
|
||||
## 0.4.1
|
||||
## Bug fixes
|
||||
- catch ajax error
|
||||
|
||||
## 0.4.0
|
||||
### Features
|
||||
- Custom sidebar
|
||||
|
||||
### Bug fixes
|
||||
- Fix undefined language
|
||||
|
||||
## 0.3.1
|
||||
### Bug fixes
|
||||
- Strip HTML tag when rendering the headings
|
||||
|
||||
## 0.3.0
|
||||
### Features
|
||||
- Add minified css files
|
||||
- Add max level option
|
||||
- Add pure.css
|
||||
|
||||
## 0.2.1
|
||||
### Bug fixes
|
||||
- Fix vue.css
|
||||
|
||||
## 0.2.0
|
||||
### Bug fixes
|
||||
- Fix route
|
||||
- Remove dynamic title
|
||||
|
||||
## 0.1.0
|
||||
### Features
|
||||
- Add buble.css
|
||||
@@ -0,0 +1 @@
|
||||
docsify.js.org
|
||||
+12
-3
@@ -13,7 +13,14 @@ var ajax = function (url, options) {
|
||||
xhr.send();
|
||||
|
||||
return {
|
||||
then: function (cb) { return xhr.addEventListener('load', cb); }
|
||||
then: function (cb) {
|
||||
xhr.addEventListener('load', cb);
|
||||
return this
|
||||
},
|
||||
catch: function (cb) {
|
||||
xhr.addEventListener('error', cb);
|
||||
return this
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2293,7 +2300,8 @@ var Docsify = function Docsify (opts) {
|
||||
Docsify.prototype.load = function load () {
|
||||
var this$1 = this;
|
||||
|
||||
ajax(((this.loc) + ".md")).then(function (res) {
|
||||
ajax(((this.loc) + ".md"))
|
||||
.then(function (res) {
|
||||
var target = res.target;
|
||||
if (target.status >= 400) {
|
||||
this$1.render('not found');
|
||||
@@ -2304,7 +2312,8 @@ Docsify.prototype.load = function load () {
|
||||
this$1.activeNav(document.querySelector('aside.sidebar'), true);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function (_) { return this$1.render('not found'); });
|
||||
};
|
||||
|
||||
Docsify.prototype.render = function render$1 (content) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.2",
|
||||
"description": "A magical documentation generator.",
|
||||
"main": "lib/docsify.js",
|
||||
"files": [
|
||||
|
||||
+8
-1
@@ -5,6 +5,13 @@ export default function (url, options = {}) {
|
||||
xhr.send()
|
||||
|
||||
return {
|
||||
then: cb => xhr.addEventListener('load', cb)
|
||||
then: function (cb) {
|
||||
xhr.addEventListener('load', cb)
|
||||
return this
|
||||
},
|
||||
catch: function (cb) {
|
||||
xhr.addEventListener('error', cb)
|
||||
return this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -40,7 +40,8 @@ class Docsify {
|
||||
}
|
||||
|
||||
load () {
|
||||
ajax(`${this.loc}.md`).then(res => {
|
||||
ajax(`${this.loc}.md`)
|
||||
.then(res => {
|
||||
const target = res.target
|
||||
if (target.status >= 400) {
|
||||
this.render('not found')
|
||||
@@ -52,6 +53,7 @@ class Docsify {
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(_ => this.render('not found'))
|
||||
}
|
||||
|
||||
render (content) {
|
||||
|
||||
Reference in New Issue
Block a user