Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.