Skip to content

Commit d071b2a

Browse files
author
Kevin Zuniga Cuellar
committed
add section for callouts, mdx, md, code blocks and import files
1 parent 7f96adb commit d071b2a

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

docs/tutorialkit.dev/src/content/docs/guides/creating-content.mdx

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,52 @@ src/templates
145145
└── index.js
146146
```
147147

148-
## Importing files
148+
## Markdown and MDX Support
149149

150-
You can import files from your code template, `_files` and `_solution` folder using the `file` or `solution` shortcode. This shortcode inserts the content of the specified file directly into your lesson content.
150+
TutorialKit comes with built-in support for both Markdown and MDX, powered by Astro. This means you can leverage all Markdown and MDX features when creating lesson content. To explore the full capabilities, check out Astro's [Markdown support](https://docs.astro.build/en/guides/markdown-content/) and [MDX support](https://docs.astro.build/en/guides/integrations-guide/mdx/) documentation for more details.
151+
152+
### Callouts
153+
154+
Callouts are visual elements designed to highlight specific information or provide additional context within a document or user interface. They are ideal for drawing attention to important tips, warnings, and other key messages.
155+
156+
```
157+
:::tip
158+
Remember to save your work frequently to avoid losing any changes.
159+
:::
160+
```
161+
162+
:::tip
163+
Remember to save your work frequently to avoid losing any changes.
164+
:::
165+
166+
167+
### Code blocks
168+
169+
TutorialKit offers a comprehensive set of code block features powered by Expressive Code. It includes all core features, along with optional plugins like collapsible sections and line numbers. For a full overview, check out the [Expressive Code documentation](https://expressive-code.com/).
170+
171+
````txt
172+
```js title="code.js" ins={4} del={5} {6} "greeting"
173+
const greeting = 'Hello, World!';
174+
175+
// This is a comment
176+
const added = 'This line was added';
177+
const removed = 'This line was removed';
178+
const highlighted = 'This line is highlighted';
179+
```
180+
````
181+
182+
```js title="code.js" ins={4} del={5} {6} "greeting"
183+
const greeting = 'Hello, World!';
184+
185+
// This is a comment
186+
const added = 'This line was added';
187+
const removed = 'This line was removed';
188+
const highlighted = 'This line is highlighted';
189+
```
190+
191+
#### Importing files
192+
193+
In addition to Expressive Code features, you can import files from your code template `_files` and `_solution` folders using the file or solution shortcodes. These shortcodes insert the content of the specified file directly into your lesson content.
151194

152195
- `file` shortcode is used to reference files from the lesson `_files` or code template folder.
153196
- `solution` shortcode is used to reference files from the lesson `_solution` folder.

0 commit comments

Comments
 (0)