Skip to content

Instantly share code, notes, and snippets.

@stekhn
Created June 16, 2026 21:02
Show Gist options
  • Select an option

  • Save stekhn/dd996852969c405e0e370d329ab61c48 to your computer and use it in GitHub Desktop.

Select an option

Save stekhn/dd996852969c405e0e370d329ab61c48 to your computer and use it in GitHub Desktop.
Create a Markdown document (GFM) from multiple Markdown files with a table of contents
ls *.md | sort -V | xargs pandoc --wrap=none --toc --toc-depth=2 --standalone -t gfm -o doc.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment