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
Copy file name to clipboardExpand all lines: README.md
+29-19Lines changed: 29 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
import"github.com/princjef/gomarkdoc"
12
12
```
13
13
14
-
Package gomarkdoc formats documentation for one or more packages as markdown for usage outside of the main https://pkg.go.dev site. It supports custom templates for tweaking representation of documentation at fine\-grained levels, exporting both exported and unexported symbols, and custom formatters for different backends.
14
+
Package gomarkdoc formats documentation for one or more packages as markdown for usage outside of the main https://pkg.go.dev[https://pkg.go.dev](<https://pkg.go.dev>) site. It supports custom templates for tweaking representation of documentation at fine\-grained levels, exporting both exported and unexported symbols, and custom formatters for different backends.
15
15
16
16
### Command Line Usage
17
17
@@ -100,7 +100,7 @@ The documentation information that is output is formatted using a series of text
100
100
101
101
- index: generates an index of symbols within a package, similar to what is seen for godoc.org. The index links to types, funcs, variables, and constants generated by other templates, so it may need to be overridden as well if any of those templates are changed in a material way.
102
102
103
-
- example: generates documentation for a single example for a package or one of its symbols. The example is generated alongside whichever symbol it represents, based on the standard naming conventions outlined in https://blog.golang.org/examples#TOC_4.
103
+
- example: generates documentation for a single example for a package or one of its symbols. The example is generated alongside whichever symbol it represents, based on the standard naming conventions outlined in https://blog.golang.org/examples#TOC_4[https://blog.golang.org/examples#TOC_4](<https://blog.golang.org/examples#TOC_4>).
104
104
105
105
- doc: generates the freeform documentation block for any of the above structures that can contain a documentation section.
106
106
@@ -229,18 +229,19 @@ Know of another project that is using gomarkdoc? Open an issue with a descriptio
NewRenderer initializes a Renderer configured using the provided options. If nothing special is provided, the created renderer will use the default set of templates and the GitHubFlavoredMarkdown.
Example renders an example's documentation to a string. You can change the rendering of the example by overriding the "example" template or one of the templates it references.
File renders a file containing one or more packages to document to a string. You can change the rendering of the file by overriding the "file" template or one of the templates it references.
Func renders a function's documentation to a string. You can change the rendering of the package by overriding the "func" template or one of the templates it references.
Package renders a package's documentation to a string. You can change the rendering of the package by overriding the "package" template or one of the templates it references.
Type renders a type's documentation to a string. You can change the rendering of the type by overriding the "type" template or one of the templates it references.
301
308
309
+
<a name="RendererOption"></a>
302
310
## type [RendererOption](<https://github.com/princjef/gomarkdoc/blob/master/renderer.go#L23>)
303
311
304
312
RendererOption configures the renderer's behavior.
@@ -307,15 +315,17 @@ RendererOption configures the renderer's behavior.
307
315
type RendererOption func(renderer *Renderer) error
Package gomarkdoc provides a command line interface for writing golang documentation in markdown format.
10
10
11
-
See https://github.com/princjef/gomarkdoc for full documentation of this tool.
11
+
See https://github.com/princjef/gomarkdoc[https://github.com/princjef/gomarkdoc](<https://github.com/princjef/gomarkdoc>) for full documentation of this tool.
12
12
13
13
## Index
14
14
15
-
-[type PackageSpec](<#type-packagespec>)
15
+
-[type PackageSpec](<#PackageSpec>)
16
16
17
17
18
+
<aname="PackageSpec"></a>
18
19
## type [PackageSpec](<https://github.com/princjef/gomarkdoc/blob/master/cmd/gomarkdoc/command.go#L30-L44>)
19
20
20
21
PackageSpec defines the data available to the \-\-output option's template. Information is recomputed for each package generated.
0 commit comments