@@ -48,19 +48,19 @@ module.exports = {
4848
4949Directives are embedded in markdown code blocks using YAML syntax:
5050
51- ``` markdown
51+ ```` markdown
5252``` {petk:include}
5353path: shared/header.md
5454```
55- ```
55+ ````
5656
5757### Include Directive
5858
5959The most powerful feature for embedding content from other files.
6060
6161#### Basic File Inclusion
6262
63- ``` markdown
63+ ```` markdown
6464``` {petk:include}
6565path: shared/header.md
6666```
@@ -70,13 +70,13 @@ path: templates/card.md
7070title: My Card
7171content: Card description
7272```
73- ```
73+ ````
7474
7575#### Advanced Glob Patterns
7676
7777Include multiple files using glob patterns with sorting and filtering:
7878
79- ``` markdown
79+ ```` markdown
8080``` {petk:include}
8181glob: posts/**/*.md
8282order_by: alphabetical_asc
@@ -94,7 +94,7 @@ order_by: random
9494seed: 12345
9595limit: 3
9696```
97- ```
97+ ````
9898
9999#### Sorting Options
100100
@@ -119,7 +119,7 @@ limit: 3
119119
120120Show or hide content based on conditions:
121121
122- ``` markdown
122+ ```` markdown
123123``` {petk:if}
124124condition: environment === 'development'
125125```
@@ -130,18 +130,18 @@ condition: user.role === 'admin'
130130```
131131# Admin Panel
132132Administrative content here.
133- ```
133+ ````
134134
135135### Variable Directive
136136
137137Define and use variables within templates:
138138
139- ``` markdown
139+ ```` markdown
140140``` {petk:var}
141141name: user_count
142142value: 42
143143```
144- ```
144+ ````
145145
146146** Configuration Example:**
147147``` javascript
@@ -163,7 +163,7 @@ module.exports = {
163163
164164The template engine automatically handles nested includes with cycle detection:
165165
166- ``` markdown
166+ ```` markdown
167167# Main Document
168168``` {petk:include}
169169path: sections/intro.md
@@ -174,15 +174,15 @@ path: sections/intro.md
174174path: shared/welcome.md
175175```
176176This creates a nested inclusion hierarchy.
177- ```
177+ ````
178178
179179** Cycle Detection:** The engine prevents infinite loops by detecting circular include dependencies and reporting clear error messages.
180180
181181### Complex Glob Patterns
182182
183183Advanced file selection using glob patterns:
184184
185- ``` markdown
185+ ```` markdown
186186``` {petk:include}
187187glob: "**/*.md"
188188exclude: "**/draft/**"
@@ -198,20 +198,20 @@ order_by: "last_updated_desc"
198198limit: 10
199199exclude: "{drafts,archive}/**"
200200```
201- ```
201+ ````
202202
203203### Deterministic Sampling
204204
205205Generate consistent random selections using seeds:
206206
207- ``` markdown
207+ ```` markdown
208208``` {petk:include}
209209glob: "examples/**/*.md"
210210order_by: "random"
211211seed: 42
212212limit: 3
213213```
214- ```
214+ ````
215215
216216This is useful for:
217217- Consistent documentation builds
@@ -222,24 +222,24 @@ This is useful for:
222222
223223Pass variables to included files for dynamic content:
224224
225- ``` markdown
225+ ```` markdown
226226``` {petk:include}
227227path: "templates/feature.md"
228228name: "Authentication"
229229status: "stable"
230230version: "2.1.0"
231231```
232- ```
232+ ````
233233
234234** templates/feature.md:**
235- ``` markdown
235+ ```` markdown
236236## {{name}} Feature
237237
238238** Status:** {{status}}
239239** Version:** {{version}}
240240
241241This feature provides...
242- ```
242+ ````
243243
244244## Configuration Integration
245245
@@ -319,15 +319,15 @@ Referenced in: 'templates/layout.md' at line 10
319319
320320### Glob Pattern Optimization
321321
322- ``` markdown
322+ ```` markdown
323323``` {petk:include}
324324glob: "docs/api/**/*.md"
325325```
326326
327327``` {petk:include}
328328glob: "**/**/**/*.md"
329329```
330- ```
330+ ````
331331
332332### Caching
333333
@@ -347,7 +347,7 @@ For large projects:
347347
348348### Documentation Site
349349
350- ``` markdown
350+ ```` markdown
351351``` {petk:include}
352352path: "shared/header.md"
353353title: "{{site.title}}"
@@ -364,11 +364,11 @@ order_by: "alphabetical_asc"
364364``` {petk:include}
365365path: "shared/footer.md"
366366```
367- ```
367+ ````
368368
369369### Blog Generation
370370
371- ``` markdown
371+ ```` markdown
372372# Latest Posts
373373
374374``` {petk:include}
@@ -383,11 +383,11 @@ limit: 5
383383glob: "posts/**/*.md"
384384order_by: "last_updated_desc"
385385```
386- ```
386+ ````
387387
388388### Code Documentation
389389
390- ``` markdown
390+ ```` markdown
391391# API Reference
392392
393393``` {petk:include}
@@ -403,7 +403,7 @@ order_by: "random"
403403seed: 1234
404404limit: 3
405405```
406- ```
406+ ````
407407
408408## Migration from Other Template Engines
409409
@@ -424,7 +424,7 @@ user: users
424424- {{user.name}} - {{user.email}}
425425``` {petk:endfor}
426426```
427- ````
427+ `````
428428
429429### From Jekyll/Liquid
430430
@@ -436,7 +436,7 @@ user: users
436436{% endfor %}
437437```
438438
439- ``` markdown
439+ ```` markdown
440440``` {petk:include}
441441path: "shared/header.md"
442442title: "My Site"
@@ -446,7 +446,7 @@ title: "My Site"
446446glob: "posts/**/*.md"
447447limit: 5
448448```
449- ```
449+ ````
450450
451451## Debugging Templates
452452
0 commit comments