-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(astro): support lessons without parts or chapters #374
base: main
Are you sure you want to change the base?
feat(astro): support lessons without parts or chapters #374
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
977e911
to
8854d0b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8854d0b
to
266c7e5
Compare
This comment was marked as outdated.
This comment was marked as outdated.
5d0cef6
to
1c0694e
Compare
packages/react/src/Nav.tsx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
518887e
to
e76ce9a
Compare
You can also omit parts and chapters, if your tutorial doesn't need that deep hierarchy. | ||
|
||
<Tabs> | ||
<TabItem label="Structure"> | ||
```plaintext | ||
- Lesson 1: Getting started | ||
- Lesson 2: Adding pages | ||
``` | ||
</TabItem> | ||
|
||
<TabItem label="File tree"> | ||
<FileTree> | ||
- src | ||
- content | ||
- tutorial | ||
- getting-started | ||
- _files/ | ||
- _solution/ | ||
- content.md | ||
- adding-pages/ | ||
- meta.md | ||
- config.ts | ||
- templates/ | ||
</FileTree> | ||
</TabItem> | ||
</Tabs> | ||
|
||
<Tabs> | ||
<TabItem label="Structure"> | ||
```plaintext | ||
- Part 1: Introduction | ||
- Lesson 1: What is Vite? | ||
- Lesson 2: Installing | ||
- … | ||
- Part 2: Project structure | ||
- … | ||
``` | ||
</TabItem> | ||
|
||
<TabItem label="File tree"> | ||
<FileTree> | ||
- src | ||
- content | ||
- tutorial | ||
- introduction/ | ||
- what-is-vite/ | ||
- _files/ | ||
- _solution/ | ||
- content.md | ||
- installing/ | ||
- project-structure/ | ||
- meta.md | ||
- config.ts | ||
- templates/ | ||
</FileTree> | ||
</TabItem> | ||
</Tabs> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"dev:lessons-in-root": "astro dev --config ./configs/lessons-in-root.ts", | ||
"preview:lessons-in-root": "astro build --config ./configs/lessons-in-root.ts && astro preview --config ./configs/lessons-in-root.ts", | ||
"dev:lessons-in-part": "astro dev --config ./configs/lessons-in-part.ts", | ||
"preview:lessons-in-part": "astro build --config ./configs/lessons-in-part.ts && astro preview --config ./configs/lessons-in-part.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm planning to create scripts/start.mjs
that can be called like node scripts/start.mjs --dev lessons-in-root
to reduce these verbose scripts. But that will be added in follow-up PR.
e76ce9a
to
8b73cc8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8b73cc8
to
109f309
Compare
109f309
to
e65eee1
Compare
/pkg-pr-new
|
Adds support for defining lessons without chapters or parts.
Custom order can be defined using
lessons
in metadata:Mixing structures is not supported and an error is thrown when these are not followed:
part
's or one-or-manylesson
'schapter
's or one-or-manylesson
'sIn practice:
However you can have multiple
part
's, where some contain justchapter
's and some contain justlesson
's:tk-mixed-hierarchy.webm