remark-based CLI formatter for Markdown files, including table of contents genreation.
ATTENTION: the following command doesn't work, apparently there's a issue with
the to-vfile
NPM package! Instead, code the contents of the file into a local
file
curl -L -o remark-format https://deno.land/x/remark_format_cli/remark-format.js; chmod a+x remark-format; ./remark-format README.md
Format a Markdown file:
deno run --unstable --allow-read --allow-write https://deno.land/x/remark_format_cli/remark-format.js README.md
ATTENTION: the following command doesn't work, apparently there's a issue with
the to-vfile
NPM package! Instead, code the contents of the file into a local
file
curl -L -o remark-format https://deno.land/x/remark_format_cli/remark-format.js; chmod a+x remark-format; ./remark-format README.md
deno install --unstable --allow-read --allow-write https://deno.land/x/remark_format_cli/remark-format.js
Currently, there are no configuration or command line options. Hopefully,
configuration options will be added in the future. For the moment, it's very
easy to customize the code directly in
./remark-format.js
There are many markdown table of contents generators. However, I haven't found one yet that generates an ordered list and is well maintained. Furthermore, I'd very much prefer a simple, if possible non-existent, installation process.
With this in mind, I found
remark-toc
and opted for
deno
as a runtime since it recently added support for
NPM modules. This combination made it very simple to create a custom remark CLI
that integrates the remark-toc
plugin.
TOC generators I've tried before: