tutorialkit icon indicating copy to clipboard operation
tutorialkit copied to clipboard

feat(astro): support lessons without parts or chapters

Open AriPerkkio opened this issue 1 year ago • 1 comments

  • 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-many lesson's
  • A part can have one-or-many chapter's or one-or-many lesson's

However you can have multiple part's, where some contain just chapter's and some contain just lesson's.

AriPerkkio avatar Oct 14 '24 12:10 AriPerkkio