You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -78,21 +99,16 @@ This will write the AsciiDoc doc for ONLY "cmd" into the out, buffer.
78
99
79
100
## Customize the output
80
101
81
-
Both `GenAsciidoc` and `GenAsciidocTree` have alternate versions with callbacks to get some control of the output:
102
+
Both `GenAsciidocTree` GeneratorOptions object provides number of customizations we can execute.
103
+
By default only Dir folder is required to be present.
82
104
83
105
```go
84
-
funcGenAsciidocTreeCustom(cmd *Command, dir string, filePrepender, linkHandler func(string) string) error{
85
-
//...
106
+
options:= doc.GeneratorOptions{
107
+
Dir: "/.",
86
108
}
87
109
```
88
-
89
-
```go
90
-
funcGenAsciidocCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) string) error {
91
-
//...
92
-
}
93
-
```
94
-
95
-
The `filePrepender` will prepend the return value given the full filepath to the rendered Asciidoc file. A common use case is to add front matter to use the generated documentation with [Hugo](http://gohugo.io/):
110
+
111
+
The `FilePrepender` field will prepend the return value given the full filepath to the rendered Asciidoc file. A common use case is to add front matter to use the generated documentation with [Hugo](http://gohugo.io/):
0 commit comments