@makenowjust/md.html
v0.4.2
Published
Markdown inside HTML
Downloads
6
Readme
:memo: md.html v0.4.2
Markdown inside HTML
Put the following two magical lines into top of HTML file, then you can write Markdown after this and browser renders Markdown automatically.
<!doctype html><meta charset="utf-8"><script src="https://unpkg.com/@makenowjust/[email protected]"></script><noscript>
<!-- vim: set ft=markdown: -->
# Hello `md.html` World!
See md.html demo!
Usage
Put the following two magical lines into top of HTML file.
Stable:
<!doctype html><meta charset="utf-8"><script src="https://unpkg.com/@makenowjust/[email protected]"></script><noscript>
<!-- vim: set ft=markdown: -->
HEAD:
<!doctype html><meta charset="utf-8"><script src="https://makenowjust.github.io/md.html/main.js"></script><noscript>
<!-- vim: set ft=markdown: -->
Or, you can get main.js
from Web and specify this path:
$ curl 'https://makenowjust.github.io/md.html/main.js > docs/main.js
$ cat > docs/index.html
<!doctype html><meta charset="utf-8"><script src="./main.js"></script><noscript>
<!-- vim: set ft=markdown: -->
^D
Features
- Don't need preprocess for publishing Markdown.
- Support footnote reference.
- Render soft breaks as
<br>
. - Emoji support (e.g. convert
:memo:
to 📝) - Set
target="_blank"
property to external links. - Math expression support (inline
$...$
and block$$⏎...⏎$$
) with KaTeX - Set slug
id
toh1-6
tags and append anchor icon. - Syntax highlighting
- Set title via frontmatter
title
property. - Correct styles on printing.
See examples!
Development
See maidfile.md
tasks.
Special Thanks
This project is built with many other packages.
- remark and unified families: Markdown to HTML pipeline
- github-markdown-css: Markdown CSS extracted from GitHub
- highlight.js: syntax highlighting library
- KaTeX: math typesetting library
- gray-matter: frontmatter parser
- babel: JavaScript transpiler
- webpack: JavaScript bundler
- jest: test runner
- maid: Markdown task runner
- prettier: opinionated formatter
and all other dependencies... Thank you!!
License
MIT (c) 2018 TSUYUSATO "MakeNowJust" Kitsune