diff --git a/.eslintrc b/.eslintrc
index 527ed9baa..d6a85f8e0 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -4,6 +4,7 @@
"browser": true
},
"globals": {
+ "Docsify": true,
"$docsify": true
}
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 76f6013bf..89ddc6422 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,97 +1,15 @@
-### 2.4.3
-> 2017-02-15
+3.0.0 / 2017-02-19
+==================
-#### Bug fixes
-* fix emoji replacing error (#76)
-
-### 2.4.2
-
-> 2017-02-14
-
-#### Bug fixes
-- fix(index): load file path error
-
-
-### 2.4.1
-
-> 2017-02-13
-
-#### Bug fixes
-- fix(index): cover page
-
-### 2.4.0
-
-> 2017-02-13
+#### Breaking change
+- Not support IE9
+- The route becomes: `/#/page?id=slug`. The previous route will be redirected
#### Features
-
-- feat(hook): add `doneEach`
-
-
-### 2.3.0
-
-> 2017-02-13
-
-#### Features
-
-- feat(src): add alias feature
-- docs: update all documents
-- feat(src): dynamic title
-- feat(hook): support custom plugin
-- feat(themes): add dark theme
-
-#### Bug fixes
-- fix(event): `auto2top` has no effect on a FF mobile browser, fixed #67
-- fix: sidebar style
-- fix(render): fix render link
-
-### 2.2.1
-
-> 2017-02-11
-
-#### Bug fixes
-- fix(search): crash when not content, fixed #68
-- fix(event): scroll active sidebar
-- fix(search): not work in mobile
-
-### 2.2.0
-
-#### Features
-- Add `Google Analytics` plugin.
-```html
-
-
-```
-
-### 2.1.0
-#### Features
-- Add search plugin
-```html
-
-
-```
-
-#### Bug fixes
-- fix sidebar style
-
-### 2.0.3
-#### Bug fixes
-- fix: rendering emojis
-- fix: css var polyfill
-
-### 2.0.2
-
-#### Bug fixes
-- fix button style in cover page.
-
-### 2.0.1
-#### Bug fixes
-- border style.
-
-### 2.0.0
-#### Features
-- Customize the theme color
-
-#### Break change
-- Remove `data-router`, `data-sidebar`, `data-sidebar-toggle` APIs
+- Faster rendering
+- Clearer source code
+- More powerful API
+- Auto header for each page [#78](https://github.com/QingWei-Li/docsify/issues/78)
+- Localization for search plugin [#80](https://github.com/QingWei-Li/docsify/issues/80)
+- Execute the script in markdown (see `executeScript`)
diff --git a/HISTORY.md b/HISTORY.md
index d3cc3e3ce..6c9358eee 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,3 +1,102 @@
+### 2.4.3
+
+> 2017-02-15
+
+#### Bug fixes
+* fix emoji replacing error (#76)
+
+### 2.4.2
+
+> 2017-02-14
+
+#### Bug fixes
+- fix(index): load file path error
+
+
+### 2.4.1
+
+> 2017-02-13
+
+#### Bug fixes
+- fix(index): cover page
+
+### 2.4.0
+
+> 2017-02-13
+
+#### Features
+
+- feat(hook): add `doneEach`
+
+
+### 2.3.0
+
+> 2017-02-13
+
+#### Features
+
+- feat(src): add alias feature
+- docs: update all documents
+- feat(src): dynamic title
+- feat(hook): support custom plugin
+- feat(themes): add dark theme
+
+#### Bug fixes
+- fix(event): `auto2top` has no effect on a FF mobile browser, fixed #67
+- fix: sidebar style
+- fix(render): fix render link
+
+### 2.2.1
+
+> 2017-02-11
+
+#### Bug fixes
+- fix(search): crash when not content, fixed #68
+- fix(event): scroll active sidebar
+- fix(search): not work in mobile
+
+### 2.2.0
+
+#### Features
+- Add `Google Analytics` plugin.
+```html
+
+
+```
+
+### 2.1.0
+#### Features
+- Add search plugin
+```html
+
+
+```
+
+#### Bug fixes
+- fix sidebar style
+
+### 2.0.3
+#### Bug fixes
+- fix: rendering emojis
+- fix: css var polyfill
+
+### 2.0.2
+
+#### Bug fixes
+- fix button style in cover page.
+
+### 2.0.1
+#### Bug fixes
+- border style.
+
+### 2.0.0
+#### Features
+- Customize the theme color
+
+#### Break change
+- Remove `data-router`, `data-sidebar`, `data-sidebar-toggle` APIs
+
+
### 1.10.5
#### Bug fixes
- fix initialize the Vue instance
diff --git a/README.md b/README.md
index dd7de59b9..3e7554ccb 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@
- Smart full-text search plugin
- Multiple themes
- Useful plugin API
-- Compatible with IE9+
+- Compatible with IE10+
## Quick start
Create a `index.html`.
diff --git a/build/build.js b/build/build.js
index cbeefc929..a64089be6 100644
--- a/build/build.js
+++ b/build/build.js
@@ -9,7 +9,7 @@ var build = function (opts) {
rollup
.rollup({
entry: 'src/' + opts.entry,
- plugins: [buble()].concat(opts.plugins || [])
+ plugins: [buble(), commonjs(), nodeResolve()].concat(opts.plugins || [])
})
.then(function (bundle) {
var dest = 'lib/' + (opts.output || opts.entry)
@@ -27,34 +27,36 @@ var build = function (opts) {
}
build({
- entry: 'index.js',
- output: 'docsify.js',
- plugins: [commonjs(), nodeResolve()]
+ entry: 'core/index.js',
+ output: 'docsify.js'
})
-isProd && build({
- entry: 'index.js',
- output: 'docsify.min.js',
- plugins: [commonjs(), nodeResolve(), uglify()]
-})
-build({
- entry: 'plugins/search.js',
- output: 'plugins/search.js',
- moduleName: 'D.Search'
-})
-isProd && build({
- entry: 'plugins/search.js',
- output: 'plugins/search.min.js',
- moduleName: 'D.Search',
- plugins: [uglify()]
-})
-build({
- entry: 'plugins/ga.js',
- output: 'plugins/ga.js',
- moduleName: 'D.GA'
-})
-isProd && build({
- entry: 'plugins/ga.js',
- output: 'plugins/ga.min.js',
- moduleName: 'D.GA',
- plugins: [uglify()]
+
+var plugins = [
+ { name: 'search', entry: 'search/index.js', moduleName: 'Search' },
+ { name: 'ga', entry: 'ga.js', moduleName: 'GA' }
+ // { name: 'front-matter', entry: 'front-matter/index.js', moduleName: 'FrontMatter' }
+]
+
+plugins.forEach(item => {
+ build({
+ entry: 'plugins/' + item.entry,
+ output: 'plugins/' + item.name + '.js',
+ moduleName: 'D.' + item.moduleName
+ })
})
+
+if (isProd) {
+ build({
+ entry: 'core/index.js',
+ output: 'docsify.min.js',
+ plugins: [uglify()]
+ })
+ plugins.forEach(item => {
+ build({
+ entry: 'plugins/' + item.entry,
+ output: 'plugins/' + item.name + '.min.js',
+ moduleName: 'D.' + item.moduleName,
+ plugins: [uglify()]
+ })
+ })
+}
diff --git a/dev.html b/dev.html
index 54becd0ae..0d432a1c6 100644
--- a/dev.html
+++ b/dev.html
@@ -4,10 +4,12 @@
docsify
-
+
+
+
-