Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 1.17 KB

README.md

File metadata and controls

71 lines (49 loc) · 1.17 KB

gm2h

Logo

Generate markdown to HTML.

This program that automatically converts markdown files to HTML files when they are saved.

Demo

Demo

Install

cargo install --git https://github.com/shinshin86/gm2h.git

Usage

# Create index.md
touch index.md

# Run gm2h
gm2h

Let's edit the markdown file.
An generated HTML file is generated in the current directory.

directory can also be specified for use. See --help for details.

gm2h --help

Use template file

gm2h supports Handlebars.

As an example, create a template like this Write {{{html}}} where you want to embed the generated HTML.

The filename extension must be hbs.

example: template.hbs

<!doctype html>
<html>
  <head>
    <title>Template sample</title>
  </head>
  <body>
    {{{html}}}
  </body>
</html>

Optionally specify the file path of the template file you created.

gm2h -t=template.hbs

Template demo

Template demo

License

MIT

Author

Yuki Shindo