Skip to content

Commit d9a910e

Browse files
authored
Merge branch 'main' into joan/mobile-support
2 parents 202f5e8 + 6963947 commit d9a910e

Some content is hidden

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

53 files changed

+1606
-329
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/demo/theme.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export const theme: ConfigBase['theme'] = {
179179
},
180180
panel: {
181181
backgroundColor: 'var(--tk-elements-panel-backgroundColor)',
182+
textColor: 'var(--tk-elements-panel-textColor)',
182183
header: {
183184
backgroundColor: 'var(--tk-elements-panel-header-backgroundColor)',
184185
textColor: 'var(--tk-elements-panel-header-textColor)',

docs/tutorialkit.dev/astro.config.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export default defineConfig({
1919
light: './src/assets/brand/tutorialkit-logo-light.svg',
2020
replacesTitle: true,
2121
},
22-
plugins: [starlightLinksValidator()],
22+
plugins: [
23+
starlightLinksValidator({
24+
exclude: ['../../guides/**/*'],
25+
}),
26+
],
2327
sidebar: [
2428
{
2529
label: 'Guides',
@@ -34,7 +38,7 @@ export default defineConfig({
3438
link: '/guides/installation/',
3539
},
3640
{
37-
label: 'Creating a Lesson',
41+
label: 'Content creation',
3842
link: '/guides/creating-content/',
3943
},
4044
{
@@ -51,6 +55,15 @@ export default defineConfig({
5155
},
5256
],
5357
},
58+
{
59+
label: 'Reference',
60+
items: [
61+
{
62+
label: 'Theming',
63+
link: '/reference/theming/',
64+
},
65+
],
66+
},
5467
],
5568
tableOfContents: {
5669
maxHeadingLevel: 5,

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/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)