https://github.com/tobilg/dynamark
https://github.com/tobilg/dynamark
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/tobilg/dynamark
- Owner: tobilg
- License: mit
- Created: 2023-05-31T07:47:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-01T15:43:08.000Z (about 3 years ago)
- Last Synced: 2025-03-01T02:38:16.412Z (over 1 year ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dynamark
Render dynamic markdown files using [Handlebars](https://handlebarsjs.com/) templates.
## Installation
To install the package globally, you can run
```bash
npm i -g dynamark
```
## Usage
```text
Usage: dynamark [options]
CLI to render markdown templates with data content
Options:
-V, --version output the version number
-t, --template markdown template file path
-d, --data data file path (JSON or YAML)
-o, --output output file path (resulting markdown file)
-l, --lint run markdownlint on the result
-h, --help display help for command
```
### Example
If you want to render the [example template](examples/table.template.md) and [data file](examples/table.data.yaml), you can run the following:
```bash
dynamark -t examples/table.template.md -d examples/table.data.yaml --lint
```
This will produce the following output on `stdout`:
```markdown
# test
| Column1 | Column2 |
|-------------|-------------|
| test1 | test1 |
| test2 | test2 |
| test3 | test3 |
```