Skip to content

Commit e513f1d

Browse files
committed
chore: document the extends property of a template config file
1 parent 8c5477d commit e513f1d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/tutorialkit.dev/src/content/docs/guides/creating-content.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Creating a Lesson
3-
description: 'Creating lessons in TutorialKit.'
2+
title: Content creation
3+
description: 'Creating content in TutorialKit.'
44
---
55
import { FileTree } from '@astrojs/starlight/components';
66

@@ -109,3 +109,11 @@ template: my-advanced-template
109109
```
110110

111111
This declaration will make TutorialKit use the `src/templates/my-advanced-template` directory as the base for the lesson.
112+
113+
If you start having a lot of templates and they all share some code, you can create a shared template that they all extend. This way, you can keep the shared code in one place and avoid duplication. To do that, you need to specify the `extends` property in the template's `.tk-config.json` file:
114+
115+
```json
116+
{
117+
"extends": "../shared-template"
118+
}
119+
```

0 commit comments

Comments
 (0)