File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,26 @@ settings are:
118118There are also files in the ` history/ ` subdirectory which contain history files used during run. See the
119119"History Checking" and "Generating History" sections for more info.
120120
121+ ### Writing snippets for documentation
122+
123+ The repo can also be used as a way to author buildable/testable example snippets for our documentation. This is done
124+ using Snipsync as described in the
125+ [ documentation repo] ( https://github.com/temporalio/documentation/blob/main/CONTRIBUTING.md#snipsync ) .
126+
127+ Snippets may be sourced from normal features, or, if writen purely for usage as a docs snippet they should be placed
128+ in ` features/snippets/snippet_name ` . Beyond the path prefix, the folder contents should follow the same practices
129+ as for a normal feature.
130+
131+ To define a snippet, use syntax like the following, where hellouniverse is the snippet identifier.
132+
133+ ```
134+ // @@@SNIPSTART hellouniverse
135+ func HelloUniverse() {
136+ fmt.Println("Hello Universe!")
137+ }
138+ // @@@SNIPEND
139+ ```
140+
121141### Best Practices
122142
123143- Try to only demonstrate/test one feature per feature directory.
You can’t perform that action at this time.
0 commit comments