tutorialkit
tutorialkit copied to clipboard
feat(astro): support lessons without parts or chapters
- Closes https://github.com/stackblitz/tutorialkit/issues/304
🚧 WIP
Adds support for defining lessons without chapters or parts.
src/content/tutorial
│
├── meta.md # Tutorial metadata
│
└── lesson-1 # Lesson in root! No part or chapter.
├── content.md
├── _files
└── _solution
src/content/tutorial
│
├── meta.md # Tutorial metadata
│
└── part-1
└── lesson-1 # Lesson in part! No chapter.
├── content.md
├── _files
└── _solution
Custom order can be defined using lessons in metadata:
---
type: 'tutorial'
lessons: ['lesson-one', 'lesson-two']
---
---
type: 'part'
lessons: ['lesson-one', 'lesson-two']
---
Mixing structures is not supported and an error is thrown when these are not followed:
- A tutorial can have one-or-many
part's or one-or-manylesson's - A part can have one-or-many
chapter's or one-or-manylesson's
However you can have multiple part's, where some contain just chapter's and some contain just lesson's.