diff --git a/docs/.vuepress/theme/layouts/GlobalLayout.vue b/docs/.vuepress/theme/layouts/GlobalLayout.vue index c8acecd..38ba41d 100644 --- a/docs/.vuepress/theme/layouts/GlobalLayout.vue +++ b/docs/.vuepress/theme/layouts/GlobalLayout.vue @@ -54,9 +54,9 @@ - +
- Voir la page + Voir la page
@@ -73,6 +73,7 @@ import RightDrawer from '@theme/components/RightDrawer.vue' import Vue from 'vue' import RuleTooltip from '@theme/global-components/RT' import Cookies from 'js-cookie' +import { shortlink } from 'shortlink' export default { name: 'GlobalLayout', @@ -176,6 +177,10 @@ export default { this.$store.commit('setRightDrawer', !this.$store.state.rightDrawer) }, + encodeURI (h) { + return shortlink.encode(h) + }, + copyURI(id) { let toCopy = document.getElementById(id) toCopy.select() diff --git a/package.json b/package.json index e7073b4..bb62b6f 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "material-design-icons-iconfont": "^5.0.1", "node-sass": "^4.13.1", "sass-loader": "^8.0.2", + "shortlink": "^1.1.0", "slugify": "^1.4.0", "vue": "^2.6.11", "vue-masonry-css": "^1.0.3", diff --git a/yarn.lock b/yarn.lock index 644488a..e4b0cc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7228,6 +7228,11 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shortlink@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shortlink/-/shortlink-1.1.0.tgz#b9c4ce003fb4d5bc5948843c7077c5074a3508bb" + integrity sha1-ucTOAD+01bxZSIQ8cHfFB0o1CLs= + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"