Skip to content

Instantly share code, notes, and snippets.

@renkin
Last active January 28, 2025 15:17
Show Gist options
  • Save renkin/45dc24de98b9ff156bb8386c1214ae8b to your computer and use it in GitHub Desktop.
Save renkin/45dc24de98b9ff156bb8386c1214ae8b to your computer and use it in GitHub Desktop.
Generate Markdown file TOCs
#!/bin/bash
# Loop through all *.md files in the current directory
for file in *.md; do
# and generate for each the TOC
bitdowntoc --inplace -p gitlab "$file"
echo "TOC generated for '$file'"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment