diff --git a/doc/rpc/command-template.md b/doc/rpc/command-template.md --- a/doc/rpc/command-template.md +++ b/doc/rpc/command-template.md @@ -1,4 +1,5 @@ --- +layout: {{.Layout}} name: {{.Name}} version: {{.Version}} group: {{.Group}} diff --git a/doc/rpc/generate.go b/doc/rpc/generate.go --- a/doc/rpc/generate.go +++ b/doc/rpc/generate.go @@ -34,11 +34,12 @@ } type CommandData struct { - Version string - Name string Description string Group string + Layout string + Name string Permalink string + Version string } var srcdir string = "" @@ -130,11 +131,12 @@ address := fmt.Sprintf("%s/%s.md", dirname, name) permalink := fmt.Sprintf("en/doc/%s/rpc/%s/%s/", version, groupname, name) err = tmpl.Execute(open(address), CommandData{ - Version: version, - Name: name, Description: command.Description, Group: groupname, + Layout: "rpccommand", + Name: name, Permalink: permalink, + Version: version, }) if err != nil { log.Fatalf("Cannot make command file %s: %s", name, err.Error()) @@ -145,11 +147,12 @@ address := path.Join(rpcdocdir, version, "rpc", "index.md") permalink := fmt.Sprintf("en/doc/%s/rpc/", version) err := tmpl.Execute(open(address), CommandData{ - Version: version, - Name: "rpcindex", Description: "", Group: "index", + Layout: "rpcindex", + Name: "rpcindex", Permalink: permalink, + Version: version, }) if err != nil { log.Fatalf("Cannot make index file: %s", err.Error()) @@ -158,11 +161,12 @@ address = path.Join(rpcdocdir, version, "index.md") permalink = fmt.Sprintf("en/doc/%s/", version) err = tmpl.Execute(open(address), CommandData{ - Version: version, - Name: "index", Description: "", Group: "index", + Layout: "docindex", + Name: "docindex", Permalink: permalink, + Version: version, }) if err != nil { log.Fatalf("Cannot make index file: %s", err.Error())