0.2.1 • Published 3 years ago

remark-toc-stdin v0.2.1

Weekly downloads
1
License
ISC
Repository
-
Last release
3 years ago

a remark-toc helper module

This module lets you add TOC with page numbers to your html output.

Usage:

const remark_toc_stdin = require('remark-toc-stdin');

remark_toc_stdin.main(my_get_pagenr_func)

where my_get_pagenr_func is a function like this:

function get_pagenr(heading, link, md_object) {
     const pagenr = resolve_pagenr_for_heading(heading);
     return pagenr.toString();
}

This modules enable us to implement toc with indexed pages in: amd2pdf .