diff --git a/CHANGELOG.md b/CHANGELOG.md index 32ba805491..acfb9cd764 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## [1.0.1](https://github.com/vuejs/vuepress/compare/v1.0.0...v1.0.1) (2019-06-10) + + +### Bug Fixes + +* **$theme-default:** using '.theme-default-content' to replace '.content' in 404 layout ([#1646](https://github.com/vuejs/vuepress/issues/1646)) ([f0d1344](https://github.com/vuejs/vuepress/commit/f0d1344)) + + +### Features + +* **$theme-default:** enhance the styles of `blockquote` ([9d20d5f](https://github.com/vuejs/vuepress/commit/9d20d5f)) + # [1.0.0](https://github.com/vuejs/vuepress/compare/v1.0.0-rc.1...v1.0.0) (2019-06-08) diff --git a/README.md b/README.md index 91823aa5a8..d1b0e21bbf 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,14 @@ vuepress channel on Discord

-> This is the branch for `VuePress 1.x` and docs are available at https://v1.vuepress.vuejs.org. +

Supporting VuePress

+ +Maintaining and developing new features to VuePress takes a considerable amount of time (if you know that Gastby's team is a company), and I am currently exploring the possibility of working on VuePress fulltime. + +- [Sponsor ULIVZ on Patreon](https://www.patreon.com/ulivz) +- [Sponsor Vue.js](https://vuejs.org/support-vuejs) + +> "VuePress is much more than that." —— ULIVZ ## Install @@ -23,19 +30,29 @@ yarn add vuepress@next -D # Install 1.x. ## Showcase -Check out [Awesome Vuepress](https://github.com/ulivz/awesome-vuepress) to find awesome things related to VuePress 1.x . +- [Awesome Vuepress](https://github.com/ulivz/awesome-vuepress) +- [vuepress.gallery](https://vuepress.gallery) (by [@vicbergquist](https://twitter.com/vicbergquist)) + +## Documentation -## Development +This is the branch for `VuePress 1.x` and docs are available at https://v1.vuepress.vuejs.org. -> Please make sure your version of Node.js is greater than 8. +## Contribution ``` bash +yarn bootstrap # Install and link dependencies for this lerna repo yarn dev # serves VuePress' own docs with itself yarn test # make sure your code change pass the test ``` If you intend to make `"substantial"` changes to VuePress or its documentation, please checkout [VuePress RFCs](./rfcs/README.md). +If you have a VuePress-related project/component/tool, add it with a pull request to [this curated list](https://github.com/ulivz/awesome-vuepress)! + +Thank you to all the people who already contributed to VuePress! + +![contributors](https://opencollective.com/vuepress/contributors.svg?width=890) + ## License [MIT](https://github.com/vuejs/vuepress/blob/master/LICENSE) diff --git a/lerna.json b/lerna.json index 57ab2ff46d..8034e98cde 100644 --- a/lerna.json +++ b/lerna.json @@ -2,5 +2,5 @@ "lerna": "2.5.1", "npmClient": "yarn", "useWorkspaces": true, - "version": "1.0.1" + "version": "1.0.2" } diff --git a/packages/@vuepress/core/lib/node/App.js b/packages/@vuepress/core/lib/node/App.js index 629763ba77..99df7fc280 100755 --- a/packages/@vuepress/core/lib/node/App.js +++ b/packages/@vuepress/core/lib/node/App.js @@ -385,7 +385,7 @@ module.exports = class App { return current } if (this.themeAPI.existsParentTheme) { - const parent = path.resolve(this.themeAPI.theme.path, filepath) + const parent = path.resolve(this.themeAPI.parentTheme.path, filepath) if (fs.existsSync(parent)) { return parent } diff --git a/packages/@vuepress/core/lib/node/theme-api/index.js b/packages/@vuepress/core/lib/node/theme-api/index.js index 2ea634e1ed..861ceeeac9 100644 --- a/packages/@vuepress/core/lib/node/theme-api/index.js +++ b/packages/@vuepress/core/lib/node/theme-api/index.js @@ -80,7 +80,7 @@ module.exports = class ThemeAPI { isInternal: true } logger.warn( - `[vuepress] Cannot resolve Layout.vue file in \n ${Layout.path},` + `[vuepress] Cannot resolve Layout.vue file in \n ${Layout.path}, ` + `fallback to default layout: ${fallbackLayoutPath}` ) } diff --git a/packages/@vuepress/core/lib/node/webpack/DevLogPlugin.js b/packages/@vuepress/core/lib/node/webpack/DevLogPlugin.js index fd563125ca..1296a82e6a 100644 --- a/packages/@vuepress/core/lib/node/webpack/DevLogPlugin.js +++ b/packages/@vuepress/core/lib/node/webpack/DevLogPlugin.js @@ -33,7 +33,7 @@ module.exports = class DevLogPlugin { + ( isFirst ? '' - : `${chalk.gray(`(${displayUrl})`)}` + : `${chalk.gray(`( ${displayUrl} )`)}` ) ) if (isFirst) { diff --git a/packages/@vuepress/core/package.json b/packages/@vuepress/core/package.json index 7199fb6f01..1410707716 100644 --- a/packages/@vuepress/core/package.json +++ b/packages/@vuepress/core/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/core", - "version": "1.0.1", + "version": "1.0.2", "description": "Minimalistic doc generator with Vue component based layout system", "main": "lib/index.js", "repository": { @@ -31,11 +31,11 @@ "dependencies": { "@babel/core": "^7.0.0", "@vue/babel-preset-app": "^3.1.1", - "@vuepress/markdown": "^1.0.1", - "@vuepress/markdown-loader": "^1.0.1", - "@vuepress/plugin-last-updated": "^1.0.1", - "@vuepress/plugin-register-components": "^1.0.1", - "@vuepress/shared-utils": "^1.0.1", + "@vuepress/markdown": "^1.0.2", + "@vuepress/markdown-loader": "^1.0.2", + "@vuepress/plugin-last-updated": "^1.0.2", + "@vuepress/plugin-register-components": "^1.0.2", + "@vuepress/shared-utils": "^1.0.2", "autoprefixer": "^9.5.1", "babel-loader": "^8.0.4", "cache-loader": "^3.0.0", diff --git a/packages/@vuepress/markdown-loader/package.json b/packages/@vuepress/markdown-loader/package.json index 2af103f2bd..8f2d2c461a 100644 --- a/packages/@vuepress/markdown-loader/package.json +++ b/packages/@vuepress/markdown-loader/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/markdown-loader", - "version": "1.0.1", + "version": "1.0.2", "description": "markdown-loader for vuepress", "main": "index.js", "publishConfig": { @@ -18,7 +18,7 @@ "generator" ], "dependencies": { - "@vuepress/markdown": "^1.0.1", + "@vuepress/markdown": "^1.0.2", "loader-utils": "^1.1.0", "lru-cache": "^5.1.1" }, diff --git a/packages/@vuepress/markdown/package.json b/packages/@vuepress/markdown/package.json index 6ce55e7765..f3fd671f2c 100644 --- a/packages/@vuepress/markdown/package.json +++ b/packages/@vuepress/markdown/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/markdown", - "version": "1.0.1", + "version": "1.0.2", "description": "markdown for vuepress", "main": "index.js", "publishConfig": { @@ -19,7 +19,7 @@ "markdown" ], "dependencies": { - "@vuepress/shared-utils": "^1.0.1", + "@vuepress/shared-utils": "^1.0.2", "markdown-it": "^8.4.1", "markdown-it-anchor": "^5.0.2", "markdown-it-chain": "^1.3.0", @@ -28,7 +28,7 @@ "prismjs": "^1.13.0" }, "devDependencies": { - "@vuepress/test-utils": "^1.0.1" + "@vuepress/test-utils": "^1.0.2" }, "author": "Evan You", "maintainers": [ diff --git a/packages/@vuepress/plugin-active-header-links/package.json b/packages/@vuepress/plugin-active-header-links/package.json index 2af962a941..96763da3be 100644 --- a/packages/@vuepress/plugin-active-header-links/package.json +++ b/packages/@vuepress/plugin-active-header-links/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-active-header-links", - "version": "1.0.1", + "version": "1.0.2", "description": "active-header-links plugin for vuepress", "main": "index.js", "publishConfig": { diff --git a/packages/@vuepress/plugin-back-to-top/package.json b/packages/@vuepress/plugin-back-to-top/package.json index 931b303365..cff44af6bf 100644 --- a/packages/@vuepress/plugin-back-to-top/package.json +++ b/packages/@vuepress/plugin-back-to-top/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-back-to-top", - "version": "1.0.1", + "version": "1.0.2", "description": "back-to-top plugin for vuepress", "main": "index.js", "publishConfig": { diff --git a/packages/@vuepress/plugin-google-analytics/package.json b/packages/@vuepress/plugin-google-analytics/package.json index 93ddaafe1a..88ad4e2bfb 100644 --- a/packages/@vuepress/plugin-google-analytics/package.json +++ b/packages/@vuepress/plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-google-analytics", - "version": "1.0.1", + "version": "1.0.2", "description": "google-analytics plugin for vuepress", "main": "index.js", "publishConfig": { diff --git a/packages/@vuepress/plugin-last-updated/package.json b/packages/@vuepress/plugin-last-updated/package.json index a7bfaa3bc8..b0a2f54dc2 100644 --- a/packages/@vuepress/plugin-last-updated/package.json +++ b/packages/@vuepress/plugin-last-updated/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-last-updated", - "version": "1.0.1", + "version": "1.0.2", "description": "last-updated plugin for vuepress", "main": "index.js", "publishConfig": { diff --git a/packages/@vuepress/plugin-medium-zoom/clientRootMixin.js b/packages/@vuepress/plugin-medium-zoom/clientRootMixin.js index e0a054539c..a83e01c980 100644 --- a/packages/@vuepress/plugin-medium-zoom/clientRootMixin.js +++ b/packages/@vuepress/plugin-medium-zoom/clientRootMixin.js @@ -1,4 +1,4 @@ -/* global SELECTOR */ +/* global SELECTOR, OPTIONS */ import './style.css' import zoom from 'medium-zoom' @@ -20,7 +20,7 @@ export default { if (this.zoom) { this.zoom.detach() } - this.zoom = zoom(SELECTOR) + this.zoom = zoom(SELECTOR, OPTIONS) }, 1000) } } diff --git a/packages/@vuepress/plugin-medium-zoom/index.js b/packages/@vuepress/plugin-medium-zoom/index.js index c9a956af81..556a7e045c 100644 --- a/packages/@vuepress/plugin-medium-zoom/index.js +++ b/packages/@vuepress/plugin-medium-zoom/index.js @@ -2,7 +2,8 @@ const { path } = require('@vuepress/shared-utils') module.exports = (options, context) => ({ define: { - SELECTOR: options.selector || '.content img' + SELECTOR: options.selector || '.theme-default-content img', + OPTIONS: options.options }, clientRootMixin: path.resolve(__dirname, 'clientRootMixin.js') }) diff --git a/packages/@vuepress/plugin-medium-zoom/package.json b/packages/@vuepress/plugin-medium-zoom/package.json index e927b6ffcc..3b9472d5dc 100644 --- a/packages/@vuepress/plugin-medium-zoom/package.json +++ b/packages/@vuepress/plugin-medium-zoom/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-medium-zoom", - "version": "1.0.1", + "version": "1.0.2", "description": "medium-zoom plugin for vuepress", "main": "index.js", "publishConfig": { @@ -18,7 +18,7 @@ "generator" ], "dependencies": { - "medium-zoom": "^0.4.0" + "medium-zoom": "^1.0.4" }, "author": "ULIVZ ", "license": "MIT", diff --git a/packages/@vuepress/plugin-nprogress/package.json b/packages/@vuepress/plugin-nprogress/package.json index da2d86af42..56ce4a66aa 100644 --- a/packages/@vuepress/plugin-nprogress/package.json +++ b/packages/@vuepress/plugin-nprogress/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-nprogress", - "version": "1.0.1", + "version": "1.0.2", "description": "nprogress plugin for vuepress", "main": "index.js", "publishConfig": { diff --git a/packages/@vuepress/plugin-pwa/package.json b/packages/@vuepress/plugin-pwa/package.json index c6353a4e42..6bfe7adeed 100644 --- a/packages/@vuepress/plugin-pwa/package.json +++ b/packages/@vuepress/plugin-pwa/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-pwa", - "version": "1.0.1", + "version": "1.0.2", "description": "pwa plugin for vuepress", "main": "index.js", "publishConfig": { @@ -18,9 +18,9 @@ "generator" ], "dependencies": { - "@vuepress/shared-utils": "^1.0.1", + "@vuepress/shared-utils": "^1.0.2", "register-service-worker": "^1.5.2", - "workbox-build": "^3.1.0" + "workbox-build": "^4.3.1" }, "author": "ULIVZ ", "license": "MIT", diff --git a/packages/@vuepress/plugin-register-components/package.json b/packages/@vuepress/plugin-register-components/package.json index a4d5f2f7cb..117916df0f 100644 --- a/packages/@vuepress/plugin-register-components/package.json +++ b/packages/@vuepress/plugin-register-components/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-register-components", - "version": "1.0.1", + "version": "1.0.2", "description": "register-global-components plugin for vuepress", "main": "index.js", "publishConfig": { @@ -24,6 +24,6 @@ }, "homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/plugin-register-components#readme", "dependencies": { - "@vuepress/shared-utils": "^1.0.1" + "@vuepress/shared-utils": "^1.0.2" } } diff --git a/packages/@vuepress/plugin-search/package.json b/packages/@vuepress/plugin-search/package.json index 5d7ec649b4..19e5702f6f 100644 --- a/packages/@vuepress/plugin-search/package.json +++ b/packages/@vuepress/plugin-search/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-search", - "version": "1.0.1", + "version": "1.0.2", "description": "search plugin for vuepress", "main": "index.js", "publishConfig": { diff --git a/packages/@vuepress/shared-utils/package.json b/packages/@vuepress/shared-utils/package.json index 089a4569ac..81b663820a 100644 --- a/packages/@vuepress/shared-utils/package.json +++ b/packages/@vuepress/shared-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/shared-utils", - "version": "1.0.1", + "version": "1.0.2", "description": "shared-utils for vuepress", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@vuepress/test-utils/package.json b/packages/@vuepress/test-utils/package.json index fe3f38ad67..5c5c4aa3f3 100644 --- a/packages/@vuepress/test-utils/package.json +++ b/packages/@vuepress/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/test-utils", - "version": "1.0.1", + "version": "1.0.2", "description": "test-utils for vuepress", "main": "index.js", "publishConfig": { @@ -22,8 +22,8 @@ "@babel/preset-env": "^7.0.0", "@types/jest": "^24.0.9", "@vue/test-utils": "^1.0.0-beta.29", - "@vuepress/core": "^1.0.1", - "@vuepress/shared-utils": "^1.0.1", + "@vuepress/core": "^1.0.2", + "@vuepress/shared-utils": "^1.0.2", "babel-jest": "^24.7.1", "execa": "^1.0.0", "jest": "^24.7.1", diff --git a/packages/@vuepress/theme-default/package.json b/packages/@vuepress/theme-default/package.json index 71f12def7e..6a79dd95e1 100644 --- a/packages/@vuepress/theme-default/package.json +++ b/packages/@vuepress/theme-default/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/theme-default", - "version": "1.0.1", + "version": "1.0.2", "description": "Default theme for VuePress", "main": "index.js", "publishConfig": { @@ -30,9 +30,9 @@ }, "homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/theme-default#readme", "dependencies": { - "@vuepress/plugin-active-header-links": "^1.0.1", - "@vuepress/plugin-nprogress": "^1.0.1", - "@vuepress/plugin-search": "^1.0.1", + "@vuepress/plugin-active-header-links": "^1.0.2", + "@vuepress/plugin-nprogress": "^1.0.2", + "@vuepress/plugin-search": "^1.0.2", "docsearch.js": "^2.5.2", "stylus": "^0.54.5", "stylus-loader": "^3.0.2", diff --git a/packages/@vuepress/theme-vue/package.json b/packages/@vuepress/theme-vue/package.json index 831da76c51..166470357e 100644 --- a/packages/@vuepress/theme-vue/package.json +++ b/packages/@vuepress/theme-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/theme-vue", - "version": "1.0.1", + "version": "1.0.2", "description": "VuePress theme for official Vue projects", "main": "index.js", "publishConfig": { @@ -30,6 +30,6 @@ }, "homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/theme-vue#readme", "dependencies": { - "@vuepress/theme-default": "^1.0.1" + "@vuepress/theme-default": "^1.0.2" } } diff --git a/packages/docs/docs/config/README.md b/packages/docs/docs/config/README.md index 060bfda810..96ea75e639 100644 --- a/packages/docs/docs/config/README.md +++ b/packages/docs/docs/config/README.md @@ -135,7 +135,7 @@ module.exports = { ### palette.styl -If you wish to apply simple color overrides to the styling of the [default preset](https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/core/lib/app/style/config.styl) or define some color variables for using later, you can create an `.vuepress/styles/palette.styl` file. +If you wish to apply simple color overrides to the styling of the [default preset](https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/core/lib/client/style/config.styl) or define some color variables for using later, you can create an `.vuepress/styles/palette.styl` file. There are a few color variables you can tweak: diff --git a/packages/docs/docs/plugin/official/plugin-medium-zoom.md b/packages/docs/docs/plugin/official/plugin-medium-zoom.md index 92369d5681..3b79b464bd 100644 --- a/packages/docs/docs/plugin/official/plugin-medium-zoom.md +++ b/packages/docs/docs/plugin/official/plugin-medium-zoom.md @@ -16,15 +16,43 @@ yarn add -D @vuepress/plugin-medium-zoom@next ## Usage +**Simple**: + ```javascript module.exports = { plugins: ['@vuepress/medium-zoom'] } ``` +**With options**: + +```javascript +module.exports = { + plugins: { + '@vuepress/medium-zoom': { + selector: 'img.zoom-custom-imgs', + // medium-zoom options here + // See: https://github.com/francoischalifour/medium-zoom#options + options: { + margin: 16 + } + } + } +} +``` + ## Options ### selector - Type: `string` -- Default: `.content img` +- Default: `.theme-default-content img` + +Note that `.theme-default-content` is the class name of [``](../../guide/using-vue.md#content) component in default theme. + +### options + +- Type: `object` +- Default: `undefined` + +[Options](https://github.com/francoischalifour/medium-zoom#options) for [medium-zoom](https://github.com/francoischalifour/medium-zoom). diff --git a/packages/docs/docs/zh/guide/markdown.md b/packages/docs/docs/zh/guide/markdown.md index 4f490b4d5a..b57acfe1ad 100644 --- a/packages/docs/docs/zh/guide/markdown.md +++ b/packages/docs/docs/zh/guide/markdown.md @@ -8,7 +8,7 @@ ### 内部链接 -网站内部的的链接,将会被转换成 `` 用于 SPA 导航。同时,站内的每一个文件夹下的 `README.md` 或者 `index.md` 文件都会被自动编译为 `index.html`,对应的链接将被视为 `/`。 +网站内部的链接,将会被转换成 `` 用于 SPA 导航。同时,站内的每一个文件夹下的 `README.md` 或者 `index.md` 文件都会被自动编译为 `index.html`,对应的链接将被视为 `/`。 以如下的文件结构为例: diff --git a/packages/docs/docs/zh/plugin/official/plugin-medium-zoom.md b/packages/docs/docs/zh/plugin/official/plugin-medium-zoom.md index f9ae2939c9..db1e6f1311 100644 --- a/packages/docs/docs/zh/plugin/official/plugin-medium-zoom.md +++ b/packages/docs/docs/zh/plugin/official/plugin-medium-zoom.md @@ -16,15 +16,45 @@ yarn add -D @vuepress/plugin-medium-zoom@next ## 使用 +## Usage + +**简单使用**: + ```javascript module.exports = { plugins: ['@vuepress/medium-zoom'] } ``` +**自定义选项**: + +```javascript +module.exports = { + plugins: { + '@vuepress/medium-zoom': { + selector: 'img.zoom-custom-imgs', + // medium-zoom options here + // See: https://github.com/francoischalifour/medium-zoom#options + options: { + margin: 16 + } + } + } +} +``` + ## 选项 ### selector - 类型: `string` -- 默认值: `.content img` +- 默认值: `.theme-default-content img` + +值得注意的是, `.theme-default-content` 是默认主题添加给 [``](../../guide/using-vue.md#content) 组件的 class name。 + +### options + +- 类型: `object` +- 默认值: `undefined` + +[medium-zoom](https://github.com/francoischalifour/medium-zoom) 的 [选项](https://github.com/francoischalifour/medium-zoom#options)。 diff --git a/packages/docs/package.json b/packages/docs/package.json index cdc76ed98b..9e6bd5297b 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "1.0.1", + "version": "1.0.2", "name": "docs", "description": "docs of VuePress", "scripts": { @@ -25,13 +25,13 @@ }, "homepage": "https://github.com/vuejs/vuepress#readme", "devDependencies": { - "@vuepress/plugin-back-to-top": "^1.0.1", - "@vuepress/plugin-google-analytics": "^1.0.1", - "@vuepress/plugin-medium-zoom": "^1.0.1", - "@vuepress/plugin-pwa": "^1.0.1", - "@vuepress/theme-vue": "^1.0.1", + "@vuepress/plugin-back-to-top": "^1.0.2", + "@vuepress/plugin-google-analytics": "^1.0.2", + "@vuepress/plugin-medium-zoom": "^1.0.2", + "@vuepress/plugin-pwa": "^1.0.2", + "@vuepress/theme-vue": "^1.0.2", "vue-toasted": "^1.1.25", - "vuepress": "^1.0.1", + "vuepress": "^1.0.2", "vuepress-plugin-flowchart": "^1.4.2" } } diff --git a/packages/vuepress/package.json b/packages/vuepress/package.json index 9217ea6aec..80def06d76 100644 --- a/packages/vuepress/package.json +++ b/packages/vuepress/package.json @@ -1,6 +1,6 @@ { "name": "vuepress", - "version": "1.0.1", + "version": "1.0.2", "description": "Minimalistic doc generator with Vue component based layout system", "main": "index.js", "repository": { @@ -29,8 +29,8 @@ }, "homepage": "https://github.com/vuejs/vuepress#readme", "dependencies": { - "@vuepress/core": "^1.0.1", - "@vuepress/theme-default": "^1.0.1", + "@vuepress/core": "^1.0.2", + "@vuepress/theme-default": "^1.0.2", "cac": "^6.3.9", "envinfo": "^7.2.0" },