Skip to content

Commit

Permalink
feat: fork smooth-scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
zyao89 committed Oct 25, 2021
1 parent 7936e11 commit 3a30d92
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"remove-markdown": "^0.3.0",
"rss": "^1.2.2",
"scrollreveal": "^4.0.9",
"smoothscroll-polyfill": "^0.4.4",
"svg-sprite-loader": "^4.3.0",
"svgo": "^1.3.2",
"svgo-loader": "^2.2.2",
Expand Down
3 changes: 2 additions & 1 deletion theme/plugins/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ function registerPlugins(ctx) {
'@vuepress/search',
'@vuepress/plugin-nprogress',
[ '@vuepress/active-header-links', themeConfig.activeHeaderLinks ],
[ 'smooth-scroll', themeConfig.smoothScroll ],
// [ 'smooth-scroll', themeConfig.smoothScroll ],
[ require('./smooth-scroll'), themeConfig.smoothScroll ],

[ 'container', {
type: 'tip',
Expand Down
3 changes: 3 additions & 0 deletions theme/plugins/smooth-scroll/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# vuepress-plugin-smooth-scroll

A Plugin for [Vuepress](https://vuepress.vuejs.org/) to make the `scrollBehavior` of `vue-router` smooth.
1 change: 1 addition & 0 deletions theme/plugins/smooth-scroll/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib');
7 changes: 7 additions & 0 deletions theme/plugins/smooth-scroll/lib/clientRootMixin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions theme/plugins/smooth-scroll/lib/clientRootMixin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions theme/plugins/smooth-scroll/lib/enhanceApp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions theme/plugins/smooth-scroll/lib/enhanceApp.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions theme/plugins/smooth-scroll/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions theme/plugins/smooth-scroll/lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions theme/plugins/smooth-scroll/styles/index.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
html
scroll-behavior smooth

0 comments on commit 3a30d92

Please sign in to comment.