From bb76a1e4461d87919f62a556efeca2ddbe542572 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 22 Nov 2016 23:33:22 +0800 Subject: [PATCH] fix title bug --- package.json | 1 + src/docsify.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 625e156..d1817ff 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "generator" ], "author": "qingwei-li (https://github.com/QingWei-Li)", + "homepage": "https://QingWei-Li.github.io/docsify", "license": "MIT", "devDependencies": { "eslint": "^3.10.2", diff --git a/src/docsify.js b/src/docsify.js index ffc7f69..5dea446 100644 --- a/src/docsify.js +++ b/src/docsify.js @@ -12,8 +12,10 @@ class Docsify { constructor (opts) { Docsify.installed = true - this.replace = 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) if (!this.dom) { this.dom = document.body