dip

module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: MIT

README

Dip

(Markdown) Document instant preview.

Inspired by grip.

Features

  • Offline-first: Dip renders Markdown with the help of goldmark - CSS/JS assets are bundled.
  • Flexible: Dip can read from standard input, files, directories and even URLs! (WIP)
  • Portable: Dip is cross-platform and runs on any OS supported by fsnotify.

Usage

dip [<path>] [<address>], where path is the directory or file to serve as HTML, and address is the TCP address and/or port.

The default is equivalent to dip . 8080, which serves the current directory at port 8080.

Installation

go install github.com/ongyx/dip/cmd/dip@latest

Development

Dip uses Go for the backend server and Node.js for the frontend CSS/JS served to clients.

For ease of installation, the bundled assets are checked into this repository under pkg/static/dist. You may want to update them periodically with:

npm update
go generate ./pkg/static

License

Dip is licensed under the MIT License.

The following resources are vendored in static/:

Directories

Path Synopsis
cmd
dip command
pkg
sse
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL