Skip to content

Commit 7f96adb

Browse files
author
Kevin Zuniga Cuellar
committed
add docs for file imports
1 parent 6f5195e commit 7f96adb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,25 @@ src/templates
144144
│ # Overrides "index.js" from "shared-template"
145145
└── index.js
146146
```
147+
148+
## Importing files
149+
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.
151+
152+
- `file` shortcode is used to reference files from the lesson `_files` or code template folder.
153+
- `solution` shortcode is used to reference files from the lesson `_solution` folder.
154+
155+
For example, the following code will insert the content of the `box.css` file from the `_files` folder:
156+
157+
````md "file"
158+
```file:/box.css
159+
```
160+
````
161+
162+
```css
163+
.box {
164+
width: 100px;
165+
height: 100px;
166+
background-color: red;
167+
}
168+
```

0 commit comments

Comments
 (0)