Skip to content

Commit 02418ae

Browse files
committed
Add and focus inline examples
1 parent b955a0e commit 02418ae

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,25 @@ In any template, use the `renderComponent` filter:
178178
<details open>
179179
<summary>View Liquid usage example</summary>
180180

181+
```liquid
182+
{{-
183+
{
184+
"type": "callout",
185+
"heading": "Help organize the 11ty Meetup!",
186+
"description": "A callout component to highlight important information.",
187+
"links": [
188+
{
189+
"linkUrl": "https://11tymeetup.dev/",
190+
"linkText": "Join the 11ty Meetup!"
191+
}
192+
],
193+
"background": "warning"
194+
} | renderComponent
195+
-}}
196+
```
197+
198+
Or from frontmatter:
199+
181200
```liquid
182201
---
183202
title: My Page
@@ -201,6 +220,25 @@ callout:
201220
<details>
202221
<summary>View Nunjucks usage example</summary>
203222

223+
```njk
224+
{{-
225+
{
226+
"type": "callout",
227+
"heading": "Help organize the 11ty Meetup!",
228+
"description": "A callout component to highlight important information.",
229+
"links": [
230+
{
231+
"linkUrl": "https://11tymeetup.dev/",
232+
"linkText": "Join the 11ty Meetup!"
233+
}
234+
],
235+
"background": "warning"
236+
} | renderComponent | safe
237+
-}}
238+
```
239+
240+
Or from frontmatter:
241+
204242
```njk
205243
---
206244
title: My Page
@@ -224,6 +262,23 @@ callout:
224262
<details>
225263
<summary>View WebC usage example</summary>
226264

265+
```html
266+
<template @html="{
267+
'type': 'callout',
268+
'heading': 'Help organize the 11ty Meetup!',
269+
'description': 'A callout component to highlight important information.',
270+
'links': [
271+
{
272+
'linkUrl': 'https://11tymeetup.dev/',
273+
'linkText': 'Join the 11ty Meetup!'
274+
}
275+
],
276+
'background': 'warning'
277+
} | renderComponent"></template>
278+
```
279+
280+
Or from frontmatter:
281+
227282
```html
228283
---
229284
title: My Page
@@ -247,6 +302,25 @@ callout:
247302
<details>
248303
<summary>View Vento usage example</summary>
249304

305+
```vento
306+
{{-
307+
{
308+
"type": "callout",
309+
"heading": "Help organize the 11ty Meetup!",
310+
"description": "A callout component to highlight important information.",
311+
"links": [
312+
{
313+
"linkUrl": "https://11tymeetup.dev/",
314+
"linkText": "Join the 11ty Meetup!"
315+
}
316+
],
317+
"background": "warning"
318+
} |> renderComponent |> safe
319+
-}}
320+
```
321+
322+
Or from frontmatter:
323+
250324
```vento
251325
---
252326
title: My Page

0 commit comments

Comments
 (0)