diff --git a/build/build.js b/build/build.js index abbbfb1..b6862ed 100644 --- a/build/build.js +++ b/build/build.js @@ -23,12 +23,12 @@ var build = function (opts) { } build({ - entry: 'docsify.js', + entry: 'index.js', output: 'docsify.js', plugins: [commonjs(), nodeResolve()] }) build({ - entry: 'docsify.js', + entry: 'index.js', output: 'docsify.min.js', plugins: [commonjs(), nodeResolve(), uglify()] }) diff --git a/src/docsify.js b/src/index.js similarity index 87% rename from src/docsify.js rename to src/index.js index 6e8f60f..1a9cc79 100644 --- a/src/docsify.js +++ b/src/index.js @@ -4,8 +4,6 @@ import bindEvent from './bind-event' const DEFAULT_OPTS = { el: '#app', - title: document.title, - sep: ' - ', repo: '' } @@ -22,7 +20,6 @@ class Docsify { Docsify.installed = true this.opts = Object.assign({}, opts, DEFAULT_OPTS) - this.opts.title = (this.opts.title ? this.opts.sep : '') + this.opts.title this.replace = true this.dom = document.querySelector(this.opts.el) @@ -51,9 +48,6 @@ class Docsify { } 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) }