singlemd

Make a website with just a single Markdown file


Motivation

why can’t a README just be my website.


Install

npm install singlemd

Usage

This command reads README.md and writes the converted html into index.html

singlemd --input ./README.md --output index.html

If you want to add an optional css file. The contents will be appended to the <head> in a <style> tag.

singlemd --input ./README.md --output index.html --style ./style.css

Options

singlemd <options>
--input ........ markdown file path (.md, .markdown)
--output ....... output path. Default 'index.html'
--style ........ css path to add in template (optional)
--title ........ add custom title (optional)
--version ...... show package version
--help ......... show help menu for a command

Examples


Usage with Gitlab Pages

Because this CLI can output a single html file, you can use Gitlab’s CI integration to output a simple Gitlab page by adding the following .gitlab-ci.yml

image: node:8.12.0 

pages:
  cache:
    paths:
    - node_modules/

  script:
  - npm install singlemd -g
  - singlemd --input ./README.md --output index.html --style ./style.css
  - mkdir ./public && mv index.html ./public
  artifacts:
    paths:
    - public
  only:
    - master

Other Options

TODO