Sign inSign up

peterdavehello/npm-doctoc

By peterdavehello

•Updated over 3 years ago

Dockerized Markdown Table-of-Contents generator - "doctoc"

Image
2

10K+

peterdavehello/npm-doctoc repository overview

⁠docker-doctoc

License Docker Hub Pulls

Docker Hub Badge

This Docker image packages the npm package doctoc⁠, which generates a table of contents for Markdown files inside a local git repository. The generated links are compatible with anchors produced by GitHub and other platforms, thanks to a command line flag.

GitHub Repository:

Docker Hub Repository:

⁠Basic Docker Usage

Use the following command to generate a table of contents for a specific Markdown file with the Docker image:

docker run --rm -v "$(pwd)":/app peterdavehello/npm-doctoc doctoc /app/README.md

Replace README.md with the path to your Markdown file. This command mounts the current directory to the /app folder inside the container and runs doctoc on the specified file. Docker will automatically pull the image if it's not already available locally.

⁠Basic doctoc Command Parameters

Here are some basic doctoc command parameters for your reference:

  • --github (default): Generate GitHub-compatible links.
  • --bitbucket: Generate Bitbucket-compatible links.
  • --gitlab: Generate GitLab-compatible links.
  • --stdout: Print the generated table of contents to stdout instead of updating the file.

For more details and usage instructions, visit the doctoc homepage: https://github.com/thlorenz/doctoc⁠

Tag summary

Content type

Image

Digest

sha256:c4cb93947…

Size

51.6 MB

Last updated

over 3 years ago

docker pull peterdavehello/npm-doctoc