From 91638300d9069ddf7ead4bf27c1dfd6a9b2a80f4 Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Thu, 10 Oct 2019 23:44:03 +0800 Subject: [PATCH] fix: add redirect plugin to handle redirection (fix #62) --- lib/index.js | 1 + package.json | 1 + yarn.lock | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) diff --git a/lib/index.js b/lib/index.js index 08dfe85d..1f972705 100644 --- a/lib/index.js +++ b/lib/index.js @@ -50,6 +50,7 @@ module.exports = (opts, ctx) => { ['vuepress-plugin-container', { type: 'warning' }], ['vuepress-plugin-container', { type: 'danger' }], ['vuepress-plugin-nprogress'], + ['vuepress-plugin-redirect'], ['vuepress-plugin-serve'], ['vuepress-plugin-smooth-scroll', opts.plugins['smooth-scroll'] || {}], ['vuepress-plugin-table-of-contents'], diff --git a/package.json b/package.json index 825feee2..289cfa4b 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "lodash.throttle": "^4.1.1", "vuepress-plugin-container": "^1.1.1", "vuepress-plugin-nprogress": "^1.1.0", + "vuepress-plugin-redirect": "^1.1.2", "vuepress-plugin-serve": "^1.1.0", "vuepress-plugin-smooth-scroll": "^0.0.3", "vuepress-plugin-table-of-contents": "^1.0.2", diff --git a/yarn.lock b/yarn.lock index 4669d828..10108135 100644 --- a/yarn.lock +++ b/yarn.lock @@ -850,6 +850,15 @@ dependencies: any-observable "^0.3.0" +"@shigma/stringify-object@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@shigma/stringify-object/-/stringify-object-3.3.0.tgz#c6611dcdf650024a9f6397580f821accd3021be3" + integrity sha512-tO5pn6RJp8m1ldYtqY3GEQA6+Nqp1cIZVrVx7iFVPx0YfhMqfplwrvyrQPP1cCwuyRoAyDr/BxVZYt+USm8LXQ== + dependencies: + get-own-enumerable-property-symbols "^3.0.0" + is-obj "^1.0.1" + is-regexp "^2.0.0" + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -1140,6 +1149,21 @@ semver "^6.0.0" upath "^1.1.0" +"@vuepress/shared-utils@^1.0.2": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.1.0.tgz#9d220ffe54f2d698c56ca5348ba2cb9dd72800da" + integrity sha512-zvYfejRRl7y3oavLvAe7dHfCu4XewKnhsyUQ7to6tfxVNoEqzhrl5HcCBwcLlphj792tvTAth5QkVegTgGfsaw== + dependencies: + chalk "^2.3.2" + diacritics "^1.3.0" + escape-html "^1.0.3" + fs-extra "^7.0.1" + globby "^9.2.0" + gray-matter "^4.0.1" + hash-sum "^1.0.2" + semver "^6.0.0" + upath "^1.1.0" + "@vuepress/shared-utils@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.0.4.tgz#520c5a6ae263accd29efc8dfad727ad62052ded2" @@ -5112,6 +5136,11 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= +is-regexp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-2.1.0.tgz#cd734a56864e23b956bf4e7c66c396a4c0b22c2d" + integrity sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA== + is-resolvable@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -9190,6 +9219,13 @@ vuepress-plugin-container@^2.0.0: dependencies: markdown-it-container "^2.0.0" +vuepress-plugin-dehydrate@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/vuepress-plugin-dehydrate/-/vuepress-plugin-dehydrate-1.0.3.tgz#75dafa70272e3bdd33401e732c98bc649c501b9c" + integrity sha512-nIVVFe5ZzESPX5IzDL/GCQbD03x50A/HZXBYlqdsv187wJ0HOkJHM878WlUrD+4Ey0VjMfh3ZLCMqVg2e0p60w== + dependencies: + "@vuepress/shared-utils" "^1.0.2" + vuepress-plugin-nprogress@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/vuepress-plugin-nprogress/-/vuepress-plugin-nprogress-1.1.1.tgz#ec4ec35ae09256c552fa10e671d7416324bd53b0" @@ -9197,6 +9233,14 @@ vuepress-plugin-nprogress@^1.1.0: dependencies: nprogress "^0.2.0" +vuepress-plugin-redirect@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vuepress-plugin-redirect/-/vuepress-plugin-redirect-1.1.2.tgz#fcadb38493f2b4c37c965eea6135f5431ab25b6a" + integrity sha512-4TwPsr1M8U7diuUG9M1l2lz9HZPExn4+96i66crjZe1Wk7kE5Nx/PWNwIUVdGH1ZgIhu8VAfrivRencT9kPemg== + dependencies: + "@shigma/stringify-object" "^3.3.0" + vuepress-plugin-dehydrate "^1.0.0" + vuepress-plugin-serve@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/vuepress-plugin-serve/-/vuepress-plugin-serve-1.1.0.tgz#ff611d6e09ee8f9a76af947b136332433e8966ef"