File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 2121
2222site-docs : site
2323 git -C site pull
24- git -C site rm ' gh*.md' 2> /dev/null || true
25- go run ./cmd/gen-docs site
26- git -C site add ' gh*.md'
24+ git -C site rm ' manual/gh*.md' 2> /dev/null || true
25+ go run ./cmd/gen-docs site/manual
26+ for f in site/manual/gh* .md; do sed -i.bak -e ' /^### SEE ALSO/,$$d' " $$ f" ; done
27+ rm -f site/manual/* .bak
28+ git -C site add ' manual/gh*.md'
2729 git -C site commit -m ' update help docs'
2830 git -C site push
2931.PHONY : site-docs
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package main
33import (
44 "fmt"
55 "os"
6+ "strings"
67
78 "github.com/cli/cli/command"
89 "github.com/spf13/cobra/doc"
@@ -28,13 +29,14 @@ func main() {
2829func filePrepender (filename string ) string {
2930 return `---
3031layout: page
32+ permalink: /:path/:basename
3133---
3234
3335`
3436}
3537
3638func linkHandler (name string ) string {
37- return fmt .Sprintf ("{{site.baseurl}}{%% link %s %%} " , name )
39+ return fmt .Sprintf ("./%s " , strings . TrimSuffix ( name , ".md" ) )
3840}
3941
4042func fatal (msg interface {}) {
You can’t perform that action at this time.
0 commit comments