Skip to content

Commit 69cb06a

Browse files
Brian Whittonsamselikoff
authored andcommitted
include docs-snippet usage in demo1 snippet
so there's a sample rendered out on the docs page
1 parent abf317f commit 69cb06a

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<div class='docs-my-8'>
22
{{#docs-snippet name='docs-snippet.hbs'}}
3-
<div id='foo'>
4-
{{#my-awesome-thing
5-
some=true
6-
options=false
7-
}}
8-
<p>Something old, something new</p>
9-
{{/my-awesome-thing}}
10-
</div>
3+
{{!-- docs/components/docs-snippet/demo1 --}}
4+
{{#docs-snippet name='your-snippet-name.hbs'}}
5+
<div id='foo'>
6+
{{#my-awesome-thing
7+
some=true
8+
options=false
9+
}}
10+
<p>Something old, something new</p>
11+
{{/my-awesome-thing}}
12+
</div>
13+
{{/docs-snippet}}
1114
{{/docs-snippet}}
1215
</div>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ To render a Handlebars snippet from one of your templates, wrap it in `{{#docs-s
88

99
{{docs/components/docs-snippet/demo1}}
1010

11+
All the snippets on this page are actually located in their own component. The above snippet is rendered like so:
12+
13+
{{#docs-snippet name="snippet-demo1.hbs"}}
14+
{{docs/components/docs-snippet/demo1}}
15+
{{/docs-snippet}}
16+
1117
All snippets must have a globally unique name.
1218

1319
Note that the block-form of `docs-snippet` won't actually execute your template code, it will just capture the static code and render the snippet. Think of it like Markdown code fences that you can use in your Handlebars templates.
@@ -38,4 +44,6 @@ You can override the detected language for syntax highlighting in your snippet b
3844

3945
Finally, you can use the `title` property to specify a header for your snippet, for instance to specify the file your snippet would be found in.
4046

47+
Here's what that looks like:
48+
4149
{{docs/components/docs-snippet/demo4}}

0 commit comments

Comments
 (0)