Skip to content

Commit 27446ac

Browse files
committed
collapsing some of the demo material down per David's feedback
1 parent cbe2279 commit 27446ac

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Sources/docc/DocCDocumentation.docc/adding-code-snippets-to-your-content.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ The `path` argument has three parts:
102102

103103
3. The name of your snippet file without the `.swift` extension
104104

105+
A snippet reference displays as a block between other paragraphs.
105106
In the example package above, the `YourProject.md` file might contain this markdown:
106107

107108
```markdown
@@ -113,11 +114,7 @@ Add a single sentence or sentence fragment, which DocC uses as the page’s abst
113114

114115
Add one or more paragraphs that introduce your content overview.
115116

116-
This paragraph appears before the snippet.
117-
118117
@Snippet(path: "YourProject/Snippets/example-snippet")
119-
120-
This paragraph appears after the snippet.
121118
```
122119

123120
If your snippet code requires setup — like imports or variable definitions — that distract from the snippet's main focus, you can add `// snippet.hide` and `// snippet.show` lines in the snippet code to exclude the lines in between from displaying in your documentation.

0 commit comments

Comments
 (0)