Skip to content

a tool that converts markdown file to single offline html file

License

Notifications You must be signed in to change notification settings

chengpengzhao/md2html

 
 

Repository files navigation

md2html

A tool that converts markdown(.md) file to single, offline html(.html) file.

Features

  1. Portability: Include everything in only one .html file
  2. Convenience: No internet access

  • Powerful markdown compatibility (use marked as its parser and compiler)
  • Table of contents preview (TOC will be created at the left side)
  • TOC automatic numbering (no need of manual nubmering. When already numbered, it won't renumbering if the number is correct)
  • Image to base64 (find all localized images embedded to markdown and convert them to base64 encoded data)
  • LaTeX support (use KaTeX, all font files have converted into base64 encoded data)
  • PlantUML support (convert uml to encoded <img> links or use plantuml.jar to generate .svg files)
  • mermaid support
  • flowchart support

Demo

  1. basicTest(in Chinese)
  2. katexSupportTest
  3. latexTest1(in Chinese)
  4. latexTest2(in Chinese)

Usage

# 1:
git clone https://github.com/chengpengzhao/md2html
# 2: edit plantuml.jar path in package.json
# 3:
npm install
# 4:
npm run build
# or run ./install.sh, then add sripts in bashrc to ~/.bashrc
# 5: add environment to PATH

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

VersionLog

License

Copyright (c) 2021, cpZhao. (MIT License)

About

a tool that converts markdown file to single offline html file

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 99.9%
  • Other 0.1%