stackblitz / tutorialkit

TutorialKit by StackBlitz - Create interactive tutorials powered by the WebContainer API
https://tutorialkit.dev
MIT License
193 stars 17 forks source link

Add `terminalOpen` to frontmatter metadata #132

Closed AriPerkkio closed 1 week ago

AriPerkkio commented 1 month ago

Is your feature request related to a problem?

It's not possible to have lessons where terminal is open by default. In tutorial lessons like https://tutorial-vite-plugin.pages.dev/1-vite-plugin/2-env-plugin/4-env-variables-in-load-hook/ I need to guide users to manually click the terminal open.

Describe the solution you'd like.

Add an option to frontmatter metadata for setting terminal open by default.

---
type: lesson
title: Some lesson
terminalOpen: true. # <-- New option, sets terminal open
---
Nemikolh commented 1 month ago

Would it maybe make more sense to have it as a property of the terminal configuration?

Like open:

---
type: lesson
title: Some lesson
terminal:
  open: true
---

Otherwise you could end up with this:

---
type: lesson
title: Some lesson
terminalOpen: true
terminal: false
---
AriPerkkio commented 1 month ago

Oh right there is already terminal option. Let's add this option there!