Merge pull request #896 from urfave/versioned-docs

Setup basic versioned docs
This commit is contained in:
lynn [they]
2019-10-23 21:26:01 -07:00
committed by GitHub
8 changed files with 1507 additions and 1520 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ before_script:
script:
- go run build.go vet
- go run build.go test
- go run build.go gfmrun
- go run build.go toc
- go run build.go gfmrun docs/v1/manual.md
- go run build.go toc docs/v1/manual.md
after_success:
- bash <(curl -s https://codecov.io/bash)
+11 -1512
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -25,4 +25,4 @@ install:
build_script:
- go run build.go vet
- go run build.go test
- go run build.go gfmrun
- go run build.go gfmrun docs/v1/manual.md
+15 -5
View File
@@ -127,8 +127,13 @@ func testCleanup() error {
return nil
}
func GfmrunActionFunc(_ *cli.Context) error {
file, err := os.Open("README.md")
func GfmrunActionFunc(c *cli.Context) error {
filename := c.Args().Get(0)
if filename == "" {
filename = "README.md"
}
file, err := os.Open(filename)
if err != nil {
return err
}
@@ -146,11 +151,16 @@ func GfmrunActionFunc(_ *cli.Context) error {
return err
}
return runCmd("gfmrun", "-c", fmt.Sprint(counter), "-s", "README.md")
return runCmd("gfmrun", "-c", fmt.Sprint(counter), "-s", filename)
}
func TocActionFunc(_ *cli.Context) error {
err := runCmd("node_modules/.bin/markdown-toc", "-i", "README.md")
func TocActionFunc(c *cli.Context) error {
filename := c.Args().Get(0)
if filename == "" {
filename = "README.md"
}
err := runCmd("node_modules/.bin/markdown-toc", "-i", filename)
if err != nil {
return err
}
+1478
View File
File diff suppressed because it is too large Load Diff
View File