Skip to content

Commit e56f4ae

Browse files
committed
Added support for examples via tag.
1 parent c678585 commit e56f4ae

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

templates/bootstrap.hbs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,23 @@ pre .hljs {
238238

239239
{{/if}}
240240

241-
{{#if description.body}}
242-
243241
<section class="examples">
244242

245243
<h3>Examples</h3>
246244

247245
{{{description.body}}}
248246

249-
</section>
247+
{{#each tags}}
250248

251-
{{/if}}
249+
{{#ifCond type "example"}}
250+
251+
<pre><code>{{string}}</code></pre>
252+
253+
{{/ifCond}}
254+
255+
{{/each}}
256+
257+
</section>
252258

253259
<section class="code">
254260

templates/markdown.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040

4141
{{/if}}
4242

43-
{{#if description.body}}
44-
4543
###Examples
4644

4745
{{{description.body}}}
4846

49-
{{/if}}
47+
{{#each tags}}{{#ifCond type "example"}}```
48+
{{{string}}}
49+
```{{/ifCond}}{{/each}}
5050

5151
{{/if}}{{/unless}}{{/each}}{{/each}}
5252

0 commit comments

Comments
 (0)