Update README

This commit is contained in:
Alex Yatskov 2022-05-08 17:51:59 -07:00
parent ab10b65a96
commit d049bd6818
3 changed files with 20 additions and 5 deletions

View File

@ -1,15 +1,25 @@
<!-- +++
Area = "projects"
GitHub = "mdview"
Layout = "page"
Tags = ["generator", "golang", "markdown", "mdview", "mit license", "web"]
Description = "Tool to view Github Flavored Markdown files in your web browser.
Collection = "ProjectsActive"
+++ -->
# MdView # MdView
MdView is a simple tool for [GitHub Flavored Markdown](https://github.github.com/gfm/) files in your web browser. MdView MdView is a tool for viewing [GitHub Flavored Markdown](https://github.github.com/gfm/) files in your web browser.
recursively renders the containing directory of the provided file path, and serves its contents over HTTP on port 8080. MdView recursively renders the parent directory of the user-provided file and serves its contents over HTTP on port
The default browser is then launched, displaying the contents. 8080. The default browser is then launched, displaying the Markdown file as an HTML document.
## Features ## Features
* Works on Linux, Mac OS, and Windows. * Works on Linux, Mac OS, and Windows.
* Single executable; no installation or configuration required. * Single executable; no installation or configuration required.
* Preview is automatically refreshes when source files change. * Preview is automatically refreshed when source files change.
* Output supports GitHub styling, including light and dark modes. * Output supports GitHub styles, including light and dark modes.
* Automatically skips any included front matter header data.
## Usage ## Usage

3
go.sum
View File

@ -22,7 +22,9 @@ github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwV
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/gorilla/feeds v1.1.1/go.mod h1:Nk0jZrvPFZX1OBe5NPiddPw7CfwF6Q9eqzaBbaightA= github.com/gorilla/feeds v1.1.1/go.mod h1:Nk0jZrvPFZX1OBe5NPiddPw7CfwF6Q9eqzaBbaightA=
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks=
github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0=
github.com/naoina/toml v0.1.1 h1:PT/lllxVVN0gzzSqSlHEmP8MJB4MY2U7STGxiouV4X8=
github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
@ -49,5 +51,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@ -15,6 +15,7 @@ import (
"github.com/FooSoft/goldsmith" "github.com/FooSoft/goldsmith"
"github.com/FooSoft/goldsmith-components/devserver" "github.com/FooSoft/goldsmith-components/devserver"
"github.com/FooSoft/goldsmith-components/plugins/document" "github.com/FooSoft/goldsmith-components/plugins/document"
"github.com/FooSoft/goldsmith-components/plugins/frontmatter"
"github.com/FooSoft/goldsmith-components/plugins/livejs" "github.com/FooSoft/goldsmith-components/plugins/livejs"
"github.com/FooSoft/goldsmith-components/plugins/markdown" "github.com/FooSoft/goldsmith-components/plugins/markdown"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
@ -61,6 +62,7 @@ func (self *builder) Build(contentDir, buildDir, cacheDir string) {
errs := goldsmith.Begin(contentDir). errs := goldsmith.Begin(contentDir).
Clean(true). Clean(true).
Chain(frontmatter.New()).
Chain(markdown.NewWithGoldmark(gm)). Chain(markdown.NewWithGoldmark(gm)).
Chain(livejs.New()). Chain(livejs.New()).
Chain(document.New(embedCss)). Chain(document.New(embedCss)).