Skip to content

Releases: gadzan/generatoc

v1.3.0

29 Jan 09:21
Compare
Choose a tag to compare

v1.3.0 changelog

Refactor event handler and optimized performance, no big breaking change implemented.

v1.2.4

23 Jun 01:55
Compare
Choose a tag to compare

v1.2.4 Change log

  1. New parameter scrollOffset in generatoc.init(), default to 0. It could scroll to the target with a vertical offset(pixel). If you have a fixed header in your page, this is what you need to set.

  2. New parameter duration in generatoc.init(), default to 7. The duration of scroll animation, a larger number means slower scroll. It accepts a number large than 1.

Sample:

const scrollOffset = 64 // Scroll to position where 64 pixel distant top of the target.
const duration = 3 // Faster scrolling.

const content = '.post-content'
const heading = ['h2', 'h3', 'h4', 'h5']
const selector = '#toc'
generatoc.init({ content, heading, selector, scrollOffset, duration })

v1.2.0

19 May 01:26
Compare
Choose a tag to compare

Animation and trace heading

v1.1.0

15 May 07:19
Compare
Choose a tag to compare

This release is production ready.