Remove dynamic title
This commit is contained in:
parent
ff9e31f0c4
commit
4f27fff283
2 changed files with 2 additions and 8 deletions
|
|
@ -23,12 +23,12 @@ var build = function (opts) {
|
||||||
}
|
}
|
||||||
|
|
||||||
build({
|
build({
|
||||||
entry: 'docsify.js',
|
entry: 'index.js',
|
||||||
output: 'docsify.js',
|
output: 'docsify.js',
|
||||||
plugins: [commonjs(), nodeResolve()]
|
plugins: [commonjs(), nodeResolve()]
|
||||||
})
|
})
|
||||||
build({
|
build({
|
||||||
entry: 'docsify.js',
|
entry: 'index.js',
|
||||||
output: 'docsify.min.js',
|
output: 'docsify.min.js',
|
||||||
plugins: [commonjs(), nodeResolve(), uglify()]
|
plugins: [commonjs(), nodeResolve(), uglify()]
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ import bindEvent from './bind-event'
|
||||||
|
|
||||||
const DEFAULT_OPTS = {
|
const DEFAULT_OPTS = {
|
||||||
el: '#app',
|
el: '#app',
|
||||||
title: document.title,
|
|
||||||
sep: ' - ',
|
|
||||||
repo: ''
|
repo: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -22,7 +20,6 @@ class Docsify {
|
||||||
Docsify.installed = true
|
Docsify.installed = true
|
||||||
|
|
||||||
this.opts = Object.assign({}, opts, DEFAULT_OPTS)
|
this.opts = Object.assign({}, opts, DEFAULT_OPTS)
|
||||||
this.opts.title = (this.opts.title ? this.opts.sep : '') + this.opts.title
|
|
||||||
|
|
||||||
this.replace = true
|
this.replace = true
|
||||||
this.dom = document.querySelector(this.opts.el)
|
this.dom = document.querySelector(this.opts.el)
|
||||||
|
|
@ -51,9 +48,6 @@ class Docsify {
|
||||||
}
|
}
|
||||||
|
|
||||||
render (content) {
|
render (content) {
|
||||||
if (this.loc.slice(1) !== 'README') {
|
|
||||||
document.title = this.loc.slice(1) + this.opts.title
|
|
||||||
}
|
|
||||||
this.dom[this.replace ? 'outerHTML' : 'innerHTML'] = render(content, this.opts)
|
this.dom[this.replace ? 'outerHTML' : 'innerHTML'] = render(content, this.opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue