Scroll to navigation

MD-UTILS(1p) User Contributed Perl Documentation MD-UTILS(1p)

NAME

md-utils - Render markdown as HTML

SYNOPSIS

  md-utils [options] [markdown-file]

DESCRIPTION

Utility to add a table of contents and other goodies to your GitHub flavored markdown.

  • Add "@TOC@" where you want to see your TOC.
  • Add "@TOC_BACK@" to insert an internal link to TOC.
  • Add "@DATE(format-str)@" where you want to see a formatted date.
  • Add "@GIT_USER@" where you want to see your git user name.
  • Add "@GIT_EMAIL@" where you want to see your git email address.
  • Use the --render option to render the HTML for the markdown

EXAMPLES

 md-utils README.md.in > README.md
 md-utils -r README.md.in

OPTIONS

Default is to add body tag, use --nobody to prevent.
Interpolates intermediate file and renders HTML.
CSS file.
Engine to use, options: github, text_markdown (default: text_markdown).
Help.
Input file, default: STDIN
For GitHub API mode is 'gfm' or 'markdown' (default: markdown).
Do not add any CSS link
Do not print a title for the table of contents.
Output file, default: STDOUT.
Render only, does NOT interpolate keywords.
Return raw HTML from engine.
String to use for a custom title, default: "Table of Contents".
Version.

TIPS

  • Use "!#" to prevent a header from being include in the table of contents. Add your own custom back to TOC message "@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.

SEE ALSO

Markdown::Render

AUTHOR AND LICENSE

Rob Lauer - rlauer6@comcast.net

This program is free software; you can use it and/or distribute it under the same terms as Perl itself.

2025-03-14 perl v5.40.1