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.
- 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.
- 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
- Clone this repository:
git clone https://github.com/badiwidya/mdserve.git
cd mdserve
- Build the project:
go build .
This will generate a mdserve (or mdserve.exe on Windows) binary in the current directory.
- (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
- fsnotify
- goldmark
- github-markdown-css
License
See LICENSE