2.6.4 • Published 12 months ago

@technote-space/doctoc v2.6.4

Weekly downloads
24
License
MIT
Repository
github
Last release
12 months ago

DocToc

npm version CI Status codecov CodeFactor License: MIT

Generates table of contents for markdown files inside local git repository. Links are compatible with anchors generated by github or other sites via a command line flag.

Table of Contents

Install

yarn add @technote-space/doctoc

Example

import {readFileSync} from 'fs';
import {findMarkdownFiles, transform} from '@technote-space/doctoc';

findMarkdownFiles(__dirname);

transform(readFileSync('README.md', {
  // mode: 'github.com', // github.com | bitbucket.org | gitlab.com | nodejs.org | ghost.org (default: github.com)
  // maxHeaderLevel: 2, // default: 4
  // title: '**Table of Contents**',
  // isNotitle: true,
  // isFolding: true,
  // entryPrefix: '*',
  // processAll: true,
  // updateOnly: true,
  // openingComment: '<!-- toc -->',
  // closingComment: '<!-- tocstop --> ',
  // checkOpeningComments: ['<!-- toc '],
  // checkClosingComments: ['<!-- tocstop '],
  // checkSkipComments: ['<!-- toc skip '],
  // isCustomMode: false,
  // customTemplate: '<p align="center">${ITEMS}</p>',
  // itemTemplate: '<a href="${LINK}">${TEXT}</a>',
  // separator: '<span>|</span>',
  // footer: '',
}));

Author

GitHub (Technote)
Blog

2.6.4

12 months ago

2.6.3

1 year ago

2.6.2

1 year ago

2.6.1

1 year ago

2.6.0

1 year ago

2.5.2

1 year ago

2.5.0

2 years ago

2.5.1

2 years ago

2.4.23

2 years ago

2.4.22

2 years ago

2.4.19

2 years ago

2.4.21

2 years ago

2.4.20

2 years ago

2.4.18

2 years ago

2.4.17

2 years ago

2.4.16

3 years ago

2.4.15

3 years ago

2.4.14

3 years ago

2.4.13

3 years ago

2.4.12

3 years ago

2.4.11

3 years ago

2.4.10

3 years ago

2.4.9

3 years ago

2.4.8

3 years ago

2.4.7

3 years ago

2.4.5

3 years ago

2.4.4

3 years ago

2.4.6

3 years ago

2.4.3

3 years ago

2.4.2

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.3.9

3 years ago

2.3.8

3 years ago

2.3.7

3 years ago

2.3.6

3 years ago

2.3.5

3 years ago

2.3.4

3 years ago

2.3.3

3 years ago

2.3.2

3 years ago

2.3.1

3 years ago

2.3.0

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago