JSPM

@mborne/markdown-to-html

0.8.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 36
  • Score
    100M100P100Q49223F
  • License MIT

Experiment static site renderer/server supporting markdown and HTML/JS views

Package Exports

  • @mborne/markdown-to-html
  • @mborne/markdown-to-html/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mborne/markdown-to-html) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

markdown-to-html

Node.js CI Coverage Status

Markdown renderer aiming at providing :

  • A static side generator (converting .md to .html)
  • A live server (serving rendered .md files)

Features

  • Markdown files are rendered using the powerfull Marked library.
  • Marked is extended with :
    • Table of content generation in markdown files ([[toc]] from pandoc)
    • The support of custom heading links (# This is the title {#custom-id})
    • The hability to rename .md to .html for relative links for static site generation.
  • A basic layout system based on handlebars is available with some built-in layouts :
    • default to generate classic pages.
    • remarkjs to generate slideshows.
  • Partial HTML/JS views can be injected in the layout to bypass markdown limitation for some pages.

Samples

Example Source Layout
Classic example samples/01-default-layout/index.md layout/default/page.html
RemarkJS slideshow samples/02-remarkjs/index.md layout/remarkjs/page.html
GitHub pages generated mixing both mborne/cours-patron-conception see build.js

Setup

sudo npm install -g @mborne/markdown-to-html
# check version
markdown-to-html --version
# show help
markdown-to-html --help

Usage

Generate static website

markdown-to-html -O output sample

Serve markdown file

markdown-serve --mode serve sample

Options

See bin/markdown-to-html.js --help to configure :

  • layout
  • output directory

Credits

It is inspired from :

License

MIT

Alternatives

See jamstack.org - Site Generators :

Docs