Skip to content

Instantly share code, notes, and snippets.

@zacparker
Forked from OscarGodson/convert_md_to_html.sh
Created August 20, 2012 07:12
Show Gist options
  • Select an option

  • Save zacparker/3401769 to your computer and use it in GitHub Desktop.

Select an option

Save zacparker/3401769 to your computer and use it in GitHub Desktop.

Revisions

  1. @OscarGodson OscarGodson created this gist Aug 20, 2012.
    19 changes: 19 additions & 0 deletions convert_md_to_html.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #!/bin/bash

    # Create the template
    read -d '' template <<- EOF
    <!DOCTYPE html>
    <html>
    <head>
    <title>HTML6 - The Spec That Brings Us Freedom</title>
    <meta name="description" content="HTML5 was a great leap forward for web developers, however there is a missing void that HTML5 has yet to fix and that void is truly semantic markup.">
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    %s
    </body>
    </html>
    EOF

    # Save the file
    printf "$template" "$(marked --gfm < README.md)" > index.html