Skip to content

romanyx/mdopen

Repository files navigation

GoDoc Build Status Go Report Card

mdopen

Allows to view markdown files in the default browser. For more details, see the API documentation.

CLI usage

Install:

go get github.com/romanyx/mdopen/cmd/mdopen

Create a markdown file:

echo "# Hello from markdown" > hello.md

View it in the default browser as html:

mdopen hello.md

You will see:

Example

API usage

Install:

go get github.com/romanyx/mdopen
package main

import "github.com/romanyx/mdopen"

func main() {
    f := strings.NewReader("# Hello from markdown")

    opnr := mdopen.New()
    if err := opnr.Open(f); err != nil {
        log.Fatal(err)
    }
}

Contributing

Please feel free to submit issues, fork the repository and send pull requests!

About

View markdown files in the default browser

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages