Skip to content

Commit 23ceb9d

Browse files
authored
Merge branch 'main' into joan/default-route
2 parents b0ed0ba + 5ed17c4 commit 23ceb9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1599
-325
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ jobs:
1919
- os: windows-latest
2020
node_version: 20.13.1 # 20.14.0 keeps causing a native `node::SetCppgcReference+18123` error in Vitest
2121
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
2224
- uses: actions/setup-node@v4
2325
with:
2426
node-version: ${{ matrix.node-version }}
2527
- name: Setup
2628
uses: pnpm/action-setup@v4
27-
with:
28-
version: 8.15.6
29-
- name: Checkout
30-
uses: actions/checkout@v4
3129
- name: Install dependencies
3230
run: pnpm install
3331
- name: Lint
@@ -41,12 +39,10 @@ jobs:
4139
name: Docs
4240
runs-on: ubuntu-latest
4341
steps:
44-
- name: Setup
45-
uses: pnpm/action-setup@v4
46-
with:
47-
version: 8.15.6
4842
- name: Checkout
4943
uses: actions/checkout@v4
44+
- name: Setup
45+
uses: pnpm/action-setup@v4
5046
- name: Install dependencies
5147
run: pnpm install
5248
- name: Build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ dist-ssr
2222
tsconfig.tsbuildinfo
2323
tsconfig.build.tsbuildinfo
2424
.tmp
25+
.tmp-*

docs/tutorialkit.dev/astro.config.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,9 @@ export default defineConfig({
3434
link: '/guides/installation/',
3535
},
3636
{
37-
label: 'Creating a Lesson',
37+
label: 'Content creation',
3838
link: '/guides/creating-content/',
3939
},
40-
{
41-
label: 'Configuration',
42-
link: '/guides/configuration/',
43-
},
4440
{
4541
label: 'Deployment',
4642
link: '/guides/deployment/',
@@ -51,6 +47,19 @@ export default defineConfig({
5147
},
5248
],
5349
},
50+
{
51+
label: 'Reference',
52+
items: [
53+
{
54+
label: 'Configuration',
55+
link: '/reference/configuration/',
56+
},
57+
{
58+
label: 'Theming',
59+
link: '/reference/theming/',
60+
},
61+
],
62+
},
5463
],
5564
tableOfContents: {
5665
maxHeadingLevel: 5,

docs/tutorialkit.dev/src/content/docs/guides/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ This documentation will guide you through the steps to build your first interact
2121

2222
As the first step, see the [Installation](/guides/installation/) page to learn how to generate the project, and once you do, learn the basics of creating the content and corresponding code in [Creating a Lesson](/guides/creating-content/).
2323

24-
This will give you the basics needed to start compiling your training materials into an interactive onboarding experience. However, you'll likely want to customize that experience to fit your specific needs. For that, TutorialKit offers a range of configuration and theming options, which we have covered in the [Configuration](/guides/configuration) page.
24+
This will give you the basics needed to start compiling your training materials into an interactive onboarding experience. However, you'll likely want to customize that experience to fit your specific needs. For that, TutorialKit offers a range of configuration and theming options, which we have covered in the [Configuration](/reference/configuration) page.

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

Lines changed: 37 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,38 @@ 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 files, you can create a shared template that they all extend. This way, you can keep the shared files 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+
```
120+
121+
This will make the template inherit all files from the `shared-template` directory. You can then override any file in the template by placing a file with the same name in the template's directory.
122+
Here's an example of how you can structure your templates:
123+
124+
```
125+
src/templates
126+
├── shared-template
127+
│ ├── index.js
128+
│ ├── index.html
129+
│ └── package.json
130+
131+
└── first-template
132+
│ │ # Contains { "extends": "../shared-template" }
133+
│ │ # Inherits all files from "shared-template"
134+
│ ├── .tk-config.json
135+
│ │
136+
│ │ # Only available in first-template
137+
│ └── main.js
138+
139+
└── second-template
140+
│ # Contains { "extends": "../shared-template" }
141+
│ # Inherits all files from "shared-template"
142+
├── .tk-config.json
143+
144+
│ # Overrides "index.js" from "shared-template"
145+
└── index.js
146+
```

docs/tutorialkit.dev/src/content/docs/guides/ui.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The preview displays the application which is a result of applying lesson files
4040

4141
<Image src={uiPreviewImage} alt="TutorialKit's Preview" />
4242

43-
Before your application template's dev server opens a port with something to be displayed, the preview shows the preparation steps such as "Installing dependencies", "Starting HTTP server" to indicate progress to the user. Note that you can customize these steps for each lesson, chapter or part of the tutorial (see: [prepareCommands](/guides/configuration/#preparecommands) reference).
43+
Before your application template's dev server opens a port with something to be displayed, the preview shows the preparation steps such as "Installing dependencies", "Starting HTTP server" to indicate progress to the user. Note that you can customize these steps for each lesson, chapter or part of the tutorial (see: [prepareCommands](/reference/configuration/#preparecommands) reference).
4444

4545
The preview updates in real-time as the user makes changes to the code, chooses to see the solution or navigates between lessons.
4646

docs/tutorialkit.dev/src/content/docs/reference/example.md

Lines changed: 0 additions & 11 deletions
This file was deleted.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)