Commit 62ca6e55 authored by NGPixel's avatar NGPixel

fix: mathjax timeout + external link icons

parent 9d090ab3
......@@ -136,9 +136,9 @@
//align-items: center;
&:before {
content: $icon-open;
content: '\ee70';
display: inline-block;
font-family: 'core-icons';
font-family: 'Nucleo Outline';
font-style: normal;
font-weight: normal;
text-decoration: none;
......
......@@ -114,9 +114,9 @@ globalTasks.then(() => {
log: true
})
// 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').shim(SHIMS).instructions('> index.js')
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').shim(SHIMS).instructions('> index.js')
const bundleSetup = fuse.bundle('configure').instructions('> configure.js')
switch (mode) {
......
......@@ -149,14 +149,12 @@
"jquery-sticky": "~1.0.4",
"lodash-cli": "~4.17.4",
"lodash-es": "~4.17.4",
"mathjax": "~2.7.1",
"node-sass": "~4.5.3",
"nodemon": "~1.11.0",
"pug-lint": "~2.4.0",
"twemoji-awesome": "~1.0.6",
"typescript": "~2.4.1",
"uglify-es": "~3.0.24",
"uglify-js": "~3.0.24",
"vee-validate": "~2.0.0-rc.6",
"vue": "~2.3.4",
"vue-clipboards": "~1.0.2",
......
'use strict'
/* global winston */
const Promise = require('bluebird')
const md = require('markdown-it')
const mdEmoji = require('markdown-it-emoji')
......@@ -123,7 +125,6 @@ mathjax.config({
}
}
})
mathjax.start()
/**
* Parse markdown content and build TOC tree
......@@ -331,12 +332,14 @@ const processMathjax = (content) => {
format: mode.format,
speakText: false,
svg: true,
state: mathjaxState
state: mathjaxState,
timeout: 30 * 1000
}, result => {
if (!result.errors) {
resolve(result.svg)
} 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')
// 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')
body
......
......@@ -13,7 +13,7 @@ html(data-logic='configure')
script(type='text/javascript').
var appconfig = !{JSON.stringify(conf)};
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')
body
......
......@@ -18,7 +18,7 @@ html(data-logic='error')
link(rel='manifest', href=appconfig.host + '/manifest.json')
// 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')
body(class='is-forbidden')
......
......@@ -18,7 +18,7 @@ html(data-logic='error')
link(rel='manifest', href=appconfig.host + '/manifest.json')
// 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')
body(class='is-notexist')
......
......@@ -18,7 +18,7 @@ html(data-logic='error')
link(rel='manifest', href=appconfig.host + '/manifest.json')
// 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')
body(class='is-error')
......
......@@ -23,7 +23,7 @@ html
var siteRoot = '!{appconfig.host}';
//- 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')
block head
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment