signalwerk / gatsby-remark-table-of-contents

gatsby remark plugin to generate table of contents
21 stars 10 forks source link

Update gatsby-remark-autolink-headers import nesting #7

Closed oalsing closed 4 years ago

oalsing commented 4 years ago

Hi,

Is there a reason why gatsby-remark-autolink-headers is nested inside gatsby-remark-table-of-contents in the README?

For reference, this is how I configured table-of-contents in my gatsby-config.

{
    resolve: `gatsby-remark-table-of-contents`,
    options: {
      exclude: 'Table of Contents',
      tight: false,
      fromHeading: 2,
      toHeading: 3,
    },
},
{
    resolve: 'gatsby-remark-autolink-headers',
    options: {
      elements: [`h1`, `h2`, `h3`],
    },
},

Also, thanks a bunch for this neat plugin. Saved me some time implementing it myself, and worked straight out-of-the-box! 🌟