Miss any of our Open RFC calls?Watch the recordings here! »


1.0.3 • Public • Published

Build Status Coverage Status APM


Create a table of contents file that summarizes the links to the target file.

↓SAMPLE mode adaptive and mode Dark adaptiveSampleImage

↓SAMPLE mode responsive and mode Light responsiveSampleImage


const indexGenerator = require('index-generator');


All configs sample

    htmlPath: './html/',
    distPath: './dist/',
    fileName: 'index.html',
    darkMode: true,
    construction: 'adaptive',
    prefixGroup: [
            prefixName: 'd',
            title: 'Develop',
            titleIcon: 'keyboard',
            fileIcon: ["style","","","view_compact","","mood","code"]
            prefixName: 'p',
            title: 'Pages',
            titleIcon: 'description'
            prefixName: 'w',
            title: 'WorkSpace',
            titleIcon: 'create'
    suffixDesktop: '-desktop.html',
    suffixMobile: '-mobile.html',
    suffixTablet: '-tablet.html',
    removeTitle: [' | TEST FILE', ' | TEST'],
    faviconPath: './image/favicon.ico',
    headTitle: 'headTitle',
    pageTitle: 'pageTitle',
    overview: 'overview',
    disclaimerTitle: 'disclaimerTitle',
    disclaimerDesc: 'disclaimerDesc',
    copyright: '© CopyrightSample.Inc'

configs parameters

Parameter Type Default Description
htmlPath string './html/' Target html file storage location
distPath string htmlPath Location of index generated by this module
fileName string 'index.html' Index file name generated by this module
darkMode boolean false Generate in dark mode if true
construction string 'responsive' 'responsive' or 'adaptive'
prefix object Please refer to the following
suffixDesktop string '-desktop.html' For adaptive the name of the suffix that is treated as a desktop
suffixMobile string '-mobile.html' For adaptive the name of the suffix that is treated as a mobile
suffixTablet string '-tablet.html' For adaptive the name of the suffix that is treated as a tablet
removeTitle string/object '' You can specify the character string you want to delete for title
faviconPath string '' favicon path can be specified
headTitle string 'index' Specify the title string of the head
pageTitle string 'pageTitle' Specify h1 of the index
overview string 'Overview text sample.' Specify the summary of index
disclaimerTitle string 'Disclaimer title sample' Specify disclaimer title
disclaimerDesc string 'Disclaimer description sample.' Specify the content of disclaimer
copyright string '© CopyrightSample.Inc' Specify copyright


Categories can be separated by prefix.
There are four settings as described in All configs sample.
prefixName:File name prefix
title:The title of the category
titleIcon:Set the name of the Google Material Icons. This is an icon placed next to the category title.
fileIcon:You can set an Google Material Icons for a file. It will be applied to the file in the order of the array.


Works only with adaptive.
If the file name excluding suffix matches, it will be treated as the same file.
Please adjust so that suffix does not overlap with the same file name


npm i index-generator

DownloadsWeekly Downloads






Unpacked Size

82.9 kB

Total Files


Last publish


  • avatar