MD-UTILS(1)

πŸ“¦
version 2.0.4 Β· 2 versions
, in fedora 43

✨ USAGE ✨

md-utils.pl options [markdown-file]

okay bestie, so md-utils (that's the MD-UTILS(1) page you're reading rn, heyyy πŸ‘‹) is this adorable little utility that adds a table of contents and other goodies to your GitHub-flavored markdown. it's giving ✨glow up for your README✨ and honestly? obsessed.

here's the lil magic spells it understands:

  • @TOC@ β€” drop this exactly where you want your table of contents to appear πŸŽ€
  • @TOC_BACK@ β€” pops in an internal link back to the TOC πŸ”
  • @DATE(format-str)@ β€” put this where you want a formatted date πŸ—“οΈ
  • @GIT_USER@ β€” shows your git user name πŸ‘‘
  • @GIT_EMAIL@ β€” shows your git email address πŸ“§
  • the --render option to render the HTML for the markdown 🌈

🌸 Examples 🌸

md-utils.pl README.md.in > README.md

md-utils.pl -r README.md.in

πŸ’… Options πŸ’…

  • -B, --body β€” the default is to add a body tag; if that's not the vibe, use --nobody to prevent it 🫢
  • -b, --both β€” interpolates the intermediate file and renders HTML, both things, together, slay
  • -c, --css β€” css file 🎨
  • -e, --engine β€” the engine: github, text_markdown (default: github)
  • -h β€” help, bestie needs it sometimes 😭
  • -i, --infile β€” input file, default: STDIN
  • -m, --mode β€” for GitHub API, mode is 'gfm' or 'markdown' (default: markdown)
  • -n, --no-titl β€” do not print a title for the TOC 🀫
  • -o, --outfile β€” outfile, default: STDOUT
  • -r, --render β€” render only, does NOT interpolate keywords ⚠️ (fr fr, it skips the keywords)
  • -R, --raw β€” return raw HTML from the engine
  • -t, --title β€” string to use for a custom title, default: "Table of Contents" πŸ‘‘
  • -v, --version β€” version
  • -N, --nocss β€” do not add any CSS link 🚫

πŸ¦‹ Tips πŸ¦‹

  • Use !# to prevent a header from being included in the table of contents.

Add your own custom back-to-TOC message like this: @TOC_BACK(Back to Index)@ πŸ’–

  • Date format strings are based on format strings supported by the Perl module 'Date::Format'.

The default format is %Y-%m-%d if no format is given. πŸ—“οΈ

  • use the --nobody tag to return the HTML without the <html><body></body></html> wrapper.

"--raw" mode will also return HTML without wrapper. ✨

no cap: --render (-r) does NOT interpolate keywords, and both --nobody and "--raw" give you HTML with no wrapper. noted, remembered, periodt πŸ’…

okay that's the whole thing, you're so ready to make your markdown iconic 🧚✨ this page is from the User Contributed Perl Documentation collection, perl v5.42.3, dated 2026-05-26, and it's literally MD-UTILS(1) β€” go forth and TOC-ify, bestie, you ate πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from