https://github.com/romanyx/mdopen
View markdown files in the default browser
https://github.com/romanyx/mdopen
go golang markdown
Last synced: 5 months ago
JSON representation
View markdown files in the default browser
- Host: GitHub
- URL: https://github.com/romanyx/mdopen
- Owner: romanyx
- License: mit
- Created: 2018-05-05T07:24:18.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-31T13:45:47.000Z (almost 8 years ago)
- Last Synced: 2025-08-13T21:15:42.095Z (11 months ago)
- Topics: go, golang, markdown
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 40
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://godoc.org/github.com/romanyx/mdopen)
[](https://travis-ci.org/romanyx/mdopen)
[](https://goreportcard.com/report/github.com/romanyx/mdopen)
# mdopen
Allows to view markdown files in the default browser. For more details, see the API [documentation](https://godoc.org/github.com/romanyx/mdopen).
## CLI usage
Install:
```bash
go get github.com/romanyx/mdopen/cmd/mdopen
```
Create a markdown file:
```bash
echo "# Hello from markdown" > hello.md
```
View it in the default browser as html:
```bash
mdopen hello.md
```
You will see:

## API usage
Install:
```bash
go get github.com/romanyx/mdopen
```
``` go
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!