https://github.com/peterdavehello/docker-doctoc
Pack npm package "doctoc" into a docker image
https://github.com/peterdavehello/docker-doctoc
docker docker-image doctoc hacktoberfest markdown readme table-of-contents table-of-contents-generator
Last synced: over 1 year ago
JSON representation
Pack npm package "doctoc" into a docker image
- Host: GitHub
- URL: https://github.com/peterdavehello/docker-doctoc
- Owner: PeterDaveHello
- Created: 2017-02-27T19:36:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-12-07T16:05:27.000Z (over 1 year ago)
- Last Synced: 2025-03-17T00:07:44.219Z (over 1 year ago)
- Topics: docker, docker-image, doctoc, hacktoberfest, markdown, readme, table-of-contents, table-of-contents-generator
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/peterdavehello/npm-doctoc
- Size: 9.77 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-doctoc

[](https://hub.docker.com/r/peterdavehello/npm-doctoc/)
[](https://hub.docker.com/r/peterdavehello/npm-doctoc/)
This Docker image packages the npm package [doctoc](https://github.com/thlorenz/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:
```sh
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: