Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rizdaprasetya/docsify-fix-pageload-scroll
Simple Docsify plugin to add additional scroll on page load to ensure correct section is in view
https://github.com/rizdaprasetya/docsify-fix-pageload-scroll
docsify docsify-plugin
Last synced: 8 days ago
JSON representation
Simple Docsify plugin to add additional scroll on page load to ensure correct section is in view
- Host: GitHub
- URL: https://github.com/rizdaprasetya/docsify-fix-pageload-scroll
- Owner: rizdaprasetya
- License: mit
- Created: 2019-09-05T10:09:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-05T11:14:29.000Z (over 5 years ago)
- Last Synced: 2024-12-03T15:33:45.904Z (about 1 month ago)
- Topics: docsify, docsify-plugin
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DocsifyPageloadScrollPlugin
## Description
This plugin try to ensure "direct-link to section", will scroll to the correct section/element.Internally it check `?id=` parameter exist on the URL, uses `scrollIntoView()` on the element id, with delayed execution (2 second default) when Docsify's `hook.ready` is called.
## Usage
Just include this script tag like the other default Docsify plugins (search, emoji, etc). Put it after Docsify script tag.
```html```
## Background
Custom plugin to overcome Docsify scrolling issue.
Docsify have auto scrolling issue on direct-link to section of a page with images: https://github.com/docsifyjs/docsify/issues/351
There was proposed fix, but sadly does not get merged for quite sometime.
This plugin does not directly fix it, but it adds another scroll, after the page loaded.