mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
Adds option to specify an header height (#1045)
* Adds option to specify an header height When using a template that has a sticky-header, clicking on the sidebar will scroll the page under the header. I added the option `headerHeight` (default = `0`) so that the content div will be scrolled down that amount of pixels. * updates documentation and renames variable
This commit is contained in:
@@ -575,3 +575,16 @@ window.$docsify = {
|
||||
```
|
||||
|
||||
> Note: The options with fallbackLanguages didn't work with the `notFoundPage` options.
|
||||
|
||||
## topMargin
|
||||
|
||||
- type: `Number`
|
||||
- default: `0`
|
||||
|
||||
Adds a space on top when scrolling content page to reach the selected section. This is useful in case you have a _sticky-header_ layout and you want to align anchors to the end of your header.
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
topMargin: 90, // default: 0
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user