mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 13:26:34 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c05d729b4 | ||
|
|
5953ef7739 | ||
|
|
d556282471 | ||
|
|
ec58149aad | ||
|
|
e15c53a6b8 | ||
|
|
f450b118ee | ||
|
|
6ac7d4f66f |
@@ -0,0 +1,33 @@
|
||||
## 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
|
||||
+6
-3
@@ -13,7 +13,8 @@ var ajax = function (url, options) {
|
||||
xhr.send();
|
||||
|
||||
return {
|
||||
then: function (cb) { return xhr.addEventListener('load', cb); }
|
||||
then: function (cb) { return xhr.addEventListener('load', cb); },
|
||||
catch: function (cb) { return xhr.addEventListener('error', cb); }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2293,7 +2294,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 +2306,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.1",
|
||||
"description": "A magical documentation generator.",
|
||||
"main": "lib/docsify.js",
|
||||
"files": [
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@ export default function (url, options = {}) {
|
||||
xhr.send()
|
||||
|
||||
return {
|
||||
then: cb => xhr.addEventListener('load', cb)
|
||||
then: cb => xhr.addEventListener('load', cb),
|
||||
catch: cb => xhr.addEventListener('error', cb)
|
||||
}
|
||||
}
|
||||
|
||||
+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