1.0.13 • Published 3 years ago

index-generator v1.0.13

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Build Status Coverage Status APM

index-generator

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

Usage

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

indexGenerator();

Config

All configs sample

indexGenerator({
    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

ParameterTypeDefaultDescription
htmlPathstring'./html/'Target html file storage location
distPathstringhtmlPathLocation of index generated by this module
fileNamestring'index.html'Index file name generated by this module
darkModebooleanfalseGenerate in dark mode if true
constructionstring'responsive''responsive' or 'adaptive'
prefixobjectPlease refer to the following
suffixDesktopstring'-desktop.html'For adaptive the name of the suffix that is treated as a desktop
suffixMobilestring'-mobile.html'For adaptive the name of the suffix that is treated as a mobile
suffixTabletstring'-tablet.html'For adaptive the name of the suffix that is treated as a tablet
removeTitlestring/object''You can specify the character string you want to delete for title
faviconPathstring''favicon path can be specified
headTitlestring'index'Specify the title string of the head
pageTitlestring'pageTitle'Specify h1 of the index
overviewstring'Overview text sample.'Specify the summary of index
disclaimerTitlestring'Disclaimer title sample'Specify disclaimer title
disclaimerDescstring'Disclaimer description sample.'Specify the content of disclaimer
copyrightstring'© CopyrightSample.Inc'Specify copyright

prefix

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.

suffix

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

1.0.13

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago