Skip to content

Commit 079bdfc

Browse files
committed
Document configuration for {{docs-snippet}}
1 parent 60c58c7 commit 079bdfc

File tree

1 file changed

+14
-1
lines changed
  • tests/dummy/app/pods/docs/components/docs-snippet

1 file changed

+14
-1
lines changed

tests/dummy/app/pods/docs/components/docs-snippet/template.hbs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,17 @@
5454

5555
<h2>Customizing Snippets</h2>
5656

57-
<p></p>
57+
<p>By default, snippets will render with a button allowing readers to copy the snippet's contents to their clipboard. You can turn this off by passing <code>showCopy=false</code> to <code>\{{docs-snippet}}</code></p>
58+
59+
<p>You can override the detected language for syntax highlighting in your snippet by specifying a <code>language</code> property.</p>
60+
61+
<p>Finally, you can use the <code>title</code> property to specify a header for your snippet, for instance to specify the file your snippet would be found in.</p>
62+
63+
{{#docs-snippet name="docs-snippet-title-example" title="app/components/my-component.js"}}
64+
import Component from '@ember/component';
65+
66+
export default Component.extend({
67+
// ...
68+
});
69+
{{/docs-snippet}}
70+

0 commit comments

Comments
 (0)