fix: mathjax timeout + external link icons
This commit is contained in:
@@ -136,9 +136,9 @@ .mkcontent {
|
|||||||
//align-items: center;
|
//align-items: center;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: $icon-open;
|
content: '\ee70';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-family: 'core-icons';
|
font-family: 'Nucleo Outline';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
@@ -114,9 +114,9 @@ globalTasks.then(() => {
|
|||||||
log: true
|
log: true
|
||||||
})
|
})
|
||||||
|
|
||||||
// const bundleVendor = fuse.bundle('vendor').shim(SHIMS).instructions('~ index.js') // eslint-disable-line no-unused-vars
|
const bundleVendor = fuse.bundle('vendor').shim(SHIMS).instructions('~ index.js') // eslint-disable-line no-unused-vars
|
||||||
// const bundleApp = fuse.bundle('app').instructions('!> [index.js]')
|
const bundleApp = fuse.bundle('app').instructions('!> [index.js]')
|
||||||
const bundleApp = fuse.bundle('app').shim(SHIMS).instructions('> index.js')
|
// const bundleApp = fuse.bundle('app').shim(SHIMS).instructions('> index.js')
|
||||||
const bundleSetup = fuse.bundle('configure').instructions('> configure.js')
|
const bundleSetup = fuse.bundle('configure').instructions('> configure.js')
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
|
|||||||
@@ -149,14 +149,12 @@
|
|||||||
"jquery-sticky": "~1.0.4",
|
"jquery-sticky": "~1.0.4",
|
||||||
"lodash-cli": "~4.17.4",
|
"lodash-cli": "~4.17.4",
|
||||||
"lodash-es": "~4.17.4",
|
"lodash-es": "~4.17.4",
|
||||||
"mathjax": "~2.7.1",
|
|
||||||
"node-sass": "~4.5.3",
|
"node-sass": "~4.5.3",
|
||||||
"nodemon": "~1.11.0",
|
"nodemon": "~1.11.0",
|
||||||
"pug-lint": "~2.4.0",
|
"pug-lint": "~2.4.0",
|
||||||
"twemoji-awesome": "~1.0.6",
|
"twemoji-awesome": "~1.0.6",
|
||||||
"typescript": "~2.4.1",
|
"typescript": "~2.4.1",
|
||||||
"uglify-es": "~3.0.24",
|
"uglify-es": "~3.0.24",
|
||||||
"uglify-js": "~3.0.24",
|
|
||||||
"vee-validate": "~2.0.0-rc.6",
|
"vee-validate": "~2.0.0-rc.6",
|
||||||
"vue": "~2.3.4",
|
"vue": "~2.3.4",
|
||||||
"vue-clipboards": "~1.0.2",
|
"vue-clipboards": "~1.0.2",
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
/* global winston */
|
||||||
|
|
||||||
const Promise = require('bluebird')
|
const Promise = require('bluebird')
|
||||||
const md = require('markdown-it')
|
const md = require('markdown-it')
|
||||||
const mdEmoji = require('markdown-it-emoji')
|
const mdEmoji = require('markdown-it-emoji')
|
||||||
@@ -123,7 +125,6 @@ mathjax.config({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
mathjax.start()
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse markdown content and build TOC tree
|
* Parse markdown content and build TOC tree
|
||||||
@@ -331,12 +332,14 @@ const processMathjax = (content) => {
|
|||||||
format: mode.format,
|
format: mode.format,
|
||||||
speakText: false,
|
speakText: false,
|
||||||
svg: true,
|
svg: true,
|
||||||
state: mathjaxState
|
state: mathjaxState,
|
||||||
|
timeout: 30 * 1000
|
||||||
}, result => {
|
}, result => {
|
||||||
if (!result.errors) {
|
if (!result.errors) {
|
||||||
resolve(result.svg)
|
resolve(result.svg)
|
||||||
} else {
|
} else {
|
||||||
reject(new Error(result.errors.join(', ')))
|
resolve(currentMatch[0])
|
||||||
|
winston.warn(result.errors.join(', '))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ html(data-logic='login')
|
|||||||
link(rel='manifest', href='/manifest.json')
|
link(rel='manifest', href='/manifest.json')
|
||||||
|
|
||||||
// JS / CSS
|
// JS / CSS
|
||||||
//- script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
||||||
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
||||||
|
|
||||||
body
|
body
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ html(data-logic='configure')
|
|||||||
script(type='text/javascript').
|
script(type='text/javascript').
|
||||||
var appconfig = !{JSON.stringify(conf)};
|
var appconfig = !{JSON.stringify(conf)};
|
||||||
var runmode = !{JSON.stringify(runmode)};
|
var runmode = !{JSON.stringify(runmode)};
|
||||||
//- script(type='text/javascript', src='/js/vendor.js')
|
script(type='text/javascript', src='/js/vendor.js')
|
||||||
script(type='text/javascript', src='/js/configure.js')
|
script(type='text/javascript', src='/js/configure.js')
|
||||||
|
|
||||||
body
|
body
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ html(data-logic='error')
|
|||||||
link(rel='manifest', href=appconfig.host + '/manifest.json')
|
link(rel='manifest', href=appconfig.host + '/manifest.json')
|
||||||
|
|
||||||
// JS / CSS
|
// JS / CSS
|
||||||
//- script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
||||||
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
||||||
|
|
||||||
body(class='is-forbidden')
|
body(class='is-forbidden')
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ html(data-logic='error')
|
|||||||
link(rel='manifest', href=appconfig.host + '/manifest.json')
|
link(rel='manifest', href=appconfig.host + '/manifest.json')
|
||||||
|
|
||||||
// JS / CSS
|
// JS / CSS
|
||||||
//- script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
||||||
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
||||||
|
|
||||||
body(class='is-notexist')
|
body(class='is-notexist')
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ html(data-logic='error')
|
|||||||
link(rel='manifest', href=appconfig.host + '/manifest.json')
|
link(rel='manifest', href=appconfig.host + '/manifest.json')
|
||||||
|
|
||||||
// JS / CSS
|
// JS / CSS
|
||||||
//- script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
||||||
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
||||||
|
|
||||||
body(class='is-error')
|
body(class='is-error')
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ html
|
|||||||
var siteRoot = '!{appconfig.host}';
|
var siteRoot = '!{appconfig.host}';
|
||||||
|
|
||||||
//- JS / CSS
|
//- JS / CSS
|
||||||
//- script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
||||||
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
||||||
|
|
||||||
block head
|
block head
|
||||||
|
|||||||
Reference in New Issue
Block a user