Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinshin86/gm2h
This program that automatically converts markdown files to HTML files when they are saved.
https://github.com/shinshin86/gm2h
generator html markdown
Last synced: about 1 month ago
JSON representation
This program that automatically converts markdown files to HTML files when they are saved.
- Host: GitHub
- URL: https://github.com/shinshin86/gm2h
- Owner: shinshin86
- License: mit
- Created: 2022-04-10T01:20:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-26T07:57:16.000Z (over 2 years ago)
- Last Synced: 2024-11-29T00:04:58.926Z (about 2 months ago)
- Topics: generator, html, markdown
- Language: Rust
- Homepage:
- Size: 153 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gm2h
![Logo](./images/logo.png)Generate markdown to HTML.
This program that automatically converts markdown files to HTML files when they are saved.
## Demo
![Demo](./images/demo.gif)## Install
```sh
cargo install --git https://github.com/shinshin86/gm2h.git
```## Usage
```sh
# 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.
```sh
gm2h --help
```## Use template file
gm2h supports [Handlebars](https://handlebarsjs.com).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`
```hbs
Template sample
{{{html}}}
```
Optionally specify the file path of the template file you created.
```sh
gm2h -t=template.hbs
```### Template demo
![Template demo](./images/template_demo.gif)## License
[MIT](https://github.com/shinshin86/gm2h/blob/main/LICENSE)## Author
[Yuki Shindo](https://shinshin86.com/en)