Skip to content

badiwidya/mdserve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdserve - Serve Markdown

A simple markdown renderer written in Go.

Features

  • Live reloading [1]
  • Github Flavored Markdown (GFM) support [2]
  • Github-like visual [3]
  • Zero configuration

It renders your Markdown file to the browser, nothing more, nothing less.

Usage

mdserve path/to/markdown.md

Then open your browser and go to: http://localhost:6942

Installation

Install using go install:

go install github.com/badiwidya/mdserve@latest

Make sure your Go binary path ($GOPATH/bin) is included in your system's environment $PATH.

  1. Linux/macOs

Add the following line to your shell config (~/.zshrc, ~/.bashrc, or anything you use).

export PATH=$PATH:$(go env GOPATH)/bin

Then apply changes by restarting your terminal or running:

source ~/.zshrc

# or

source ~/.bashrc

# or etc.
  1. Windows
  • Open Start Menu and search for env, then select Edit the system environment variables.
  • In the System Properties window, click Environment Variables....
  • Under System variables (or User variables), find and select the variable named Path, then click Edit.
  • Click New, then enter:
%USERPROFILE%\go\bin
  • Click OK to save and apply changes.
  • Restart your terminal (e.g., PowerShell, CMD, or Git Bash).

Manual installation

  1. Clone this repository:
git clone https://github.com/badiwidya/mdserve.git
cd mdserve
  1. Build the project:
go build .

This will generate a mdserve (or mdserve.exe on Windows) binary in the current directory.

  1. (Optional) Move the binary to your $PATH

On Linux/macOS:

mv mdserve ~/.local/bin

On Windows:

move mdserve.exe %USERPROFILE%\bin

NOTE: Make sure %USERPROFILE%\bin is added to your PATH.

Credits

  1. fsnotify
  2. goldmark
  3. github-markdown-css

License

See LICENSE

About

A cross-platform CLI tool to instantly serve and live-preview Markdown files with GitHub styling.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages