MARKDOWN(1)

๐Ÿ’… MARKDOWN(1) ๐Ÿ’…

ok so this is the markdown page from the General Commands Manual โ€” yes, bestie, the whole manual section, we're being fancy today ๐ŸŽ€ โ€” and it's literally your text-to-html glow-up machine.


โœจ NAME โœจ

markdown โ€” text to html conversion tool ๐Ÿฆ‹


๐ŸŒธ SYNOPSIS ๐ŸŒธ

markdown [-d] [-T] [-V] [-b url-base] [-C prefix] [-F bitmap] [-f flags]
         [-n] [-o file] [-S] [-s text] [-t text] [-toc] [textfile]

๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so the markdown utility reads the markdown(7)-formatted textfile (or stdin if you didn't specify one, no pressure ๐Ÿ’…), compiles it, and writes the html output to stdout. that's it. that's the whole vibe. โœจ

The options are as follows:

  • -b url-base โ€” links in the source that begin with / get prefixed with url-base in the output. slay, relative links. ๐Ÿ”—
  • -C โ€” when you're processing markdown extra-style footnotes, use the given prefix instead of the default of fn. yes, it takes a prefix (that's the prefix up in the synopsis, keep up bestie ๐Ÿซถ).
  • -d โ€” instead of writing the html file, dump a parse tree to stdout. literally the raw tea, no filter. ๐ŸŒณ
  • -f flags โ€” set or clear various translation flags. the flags are in a comma-delimited list, with an optional + (enable), - (disable), or no (disable) lprefix on each flag. (yes, "lprefix". that's what it says. i don't make the rules ๐Ÿ’€)
    • links โ€” allow links.
    • image โ€” allow images.
    • smarty โ€” enable smartypants.
    • pants โ€” enable smartypants.
    • html โ€” allow raw html.
    • strict โ€” disable superscript, strikethrough & relaxed emphasis.
    • ext โ€” enable pseudo-protocols.
    • cdata โ€” generate code for xml ![CDATA[...]].
    • superscript โ€” enable superscript processing.
    • emphasis โ€” emphasis happens everywhere.
    • tables โ€” don't process PHP Markdown Extra tables.
    • del โ€” enable ~~strikethrough~~.
    • strikethrough โ€” enable ~~strikethrough~~.
    • toc โ€” enable table-of-contents processing.
    • 1.0 โ€” compatibility with MarkdownTest_1.0
    • autolink โ€” make http://foo.com a link even without <>.
    • safelink โ€” paranoid check for link protocol.
    • header โ€” process pandoc-style header blocks.
    • tabstop โ€” expand tabs to 4 spaces.
    • divquote โ€” allow >%class% blocks.
    • alphalist โ€” allow alphabetic lists.
    • definitionlist โ€” allow definition lists at all (default). use dldiscount and dlextra to control which syntaxes are respected.
    • dldiscount โ€” enable discount-style definition lists (default).
    • dlextra โ€” enable extra-style definition lists (not default). both styles may be enabled simultaneously.
    • footnote โ€” allow markdown extra-style footnotes.
    • style โ€” extract <style> blocks from the output.
    • fencedcode โ€” allow fenced code blocks (not default).
    • idanchor โ€” use id= anchors for table-of-contents links instead of <a name=/> (not default).
    • githubtags โ€” allow underscore and dash in passed through element names (not default).
    • urlencodedanchor โ€” use url-encoded chars for multibyte and nonalphanumeric chars rather than dots in toc links.

as an example, the option -f nolinks,smarty tells markdown to not allow <a tags, and to do smarty pants processing. iykyk ๐Ÿ’…

  • -F bitmap โ€” set translation flags. bitmap is a bit map of the various configuration options described in markdown(3) (the flag values are defined in mkdio.h). yes it's a bitmap. yes you need the header. ๐Ÿงš
  • -n โ€” don't write generated html. generating nothing, iconic. ๐Ÿ™ˆ
  • -o file โ€” write the generated html to file. ๐Ÿ“
  • -S โ€” output <style> blocks.
  • -V โ€” show the version# and compile-time configuration data.
    • if the version includes the string DEBUG, markdown was configured with memory allocation debugging. ๐Ÿ’€
    • if the version includes the string TAB, markdown was configured to use the specified tabstop.
  • -VV โ€” show the version#, the compile-time configuration, and the run-time configuration. double V, double the lore. ๐Ÿ‘‘
  • -t text โ€” use mkd_text(3) to format text instead of processing stdin with the markdown(3) function.
  • -T โ€” if run with the table-of-content flag on, dump the table of contents before the formatted text.
  • -s text โ€” use the markdown(3) function to format text.
  • -toc โ€” set the table-of-content flag, then dump the table of contents before the formatted text (a shorthand for --T --toc)

๐ŸŒˆ RETURN VALUES ๐ŸŒˆ

The markdown utility exits 0 on success, and >0 if an error occurs. zero is the good one, bestie. โœจ


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

markdown(3), markdown(7), mkd-extensions(7). go read them, they're giving lore. ๐Ÿ“š


๐Ÿ’œ AUTHOR ๐Ÿ’œ

David Parsons (orc@pell.portland.or.us) โ€” the main character who made this happen. ๐Ÿซถ


ok that's the whole page, no cap, nothing skipped. run it, love it, -toc it. ๐Ÿ’…โœจ

and the cute sign-off: this whole thing is dated January 7, 2008 and it lives under the MASTODON source/version line โ€” yes, that's the version info at the bottom, we're calling it a vintage icon. ๐ŸŽ€

๐Ÿ“ฆ where this page comes from