theRDnotes

2020 February 20th

Part11: Table of Contents

Have a look at the content section below. This has been auto-generated using plugin gatsby-remark-table-of-contents from the headers available in the page.

Content

Install

Install the plugin using below command

npm install gatsby-remark-table-of-contents

Configure

Add the following configuration under gatsby-transformer-remark plugin in gatsby-config.js file.

{
    resolve: `gatsby-transformer-remark`,
    options: {
    plugins: [
        {
        resolve: `gatsby-remark-table-of-contents`,
        options: {
            exclude: "Content",
            tight: false,
            fromHeading: 2,
            toHeading: 6
        },
        }
    ],
    },
}

To learn about the options, visit here