Markdown realtime preview on browser with your favorite editor
npm install @mryhryki/markdown-previewMarkdown realtime preview on browser with your favorite editor.
- Execute immediately with npx.
- Offline support if installed.
- You can create your own template easily.
style="max-width: 100%; object-fit: contain;"
src="https://github.com/mryhryki/markdown-preview/assets/12733897/8c7afd39-4d02-4e9a-b84f-863f11630e6b"
controls>
``shell`
$ npx @mryhryki/markdown-preview
Version : v0.6.0
Root Directory : /current/dir
Default File : README.md
Extensions : md, markdown
Template File : /path/to/template/default.html
Preview URL : http://localhost:34567
`shell
$ npm install -g @mryhryki/markdown-previewor
$ yarn install -g @mryhryki/markdown-preview
$ markdown-preview
Version : v0.6.0
Root Directory : /current/dir
Default File : README.md
Extensions : md, markdown
Template File : /path/to/template/default-dark.html
Preview URL : http://localhost:34567
`
| short | long | environment variable | parameter | required | default |
|-------|--------------|-----------------------------|-------------------------------------------------------|----------|-------------|
| -f | --file | MARKDOWN_PREVIEW_FILE | relative file path | no | README.md |
| -e | --extensions | MARKDOWN_PREVIEW_EXTENSIONS | comma separated extensions | no | md,markdown |
| -t | --template | MARKDOWN_PREVIEW_TEMPLATE | defined template name (1) or template file path (2) | no | default |
| -p | --port | MARKDOWN_PREVIEW_PORT | port number | no | 34567 |
| | --log-level | MARKDOWN_PREVIEW_LOG_LEVEL | trace, debug, info
warn, error, fatal | no | info |
| | --no-opener | MARKDOWN_PREVIEW_NO_OPENER | true (only env var) | no | |
| -v | --version | | | no | |
| -h | --help | | | no | |
- default
You just need to load /markdown-preview-websocket.js and register a callback to connectMarkdownPreview.
A simple example code is below:
`html`
`shell
$ npm install
Run release workflow.