[feature] single page markdown composing

This commit is contained in:
Klesh Wong 2020-11-23 12:12:55 +08:00
parent d97b93d220
commit 6a3e3ca3fb

View File

@ -7,11 +7,18 @@ DIR=$(dirname "$(readlink -f "$0")")
# install cmark-gfm: convert markdown to html,man,xml,latex,comman-mark
case "$PM" in
apt)
sudo apt install -y cmark-gfm
sudo apt install -y cmark-gfm entr
;;
pacman)
sudo pacman -S --noconfirm --needed cmark-gfm
sudo pacman -S --noconfirm --needed cmark-gfm entr
;;
esac
# convert to html with embeded <style>: cmark-gfm input.md --to html --unsafe
# live server for html previewing
. "$PDIR/devel/nodejs.sh"
sudo $NPM_BIN install -g live-server
# convert to html with embeded <style>: cmark-gfm input.md --to html --unsafe > /path/to/output.html
# entr watch input.md and rerun convert command
# live-server to observe html file and reload browser