MD-UTILS(1)
β¨ 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
--renderoption 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--nobodyto 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
--nobodytag 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--nobodyand"--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
- fedora 43: perl-Markdown-Render 2.0.4-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms