Assets
This reference describes assets and how you apply them.
Assets are images or video files referenced in assignment files or notes. For example, you might add a screenshot of your software to show a learner where to click. Or you might show a video before your learner starts a challenge.
Place all your assets in a directory called
assets
located in the track root directory like in the following example:.
├── 01-title
│ └── assignment.md
├── assets
│ ├── image.png
│ └── video.mp4
├── config.yml
└── track.yml
↳ Here the
assets
directory contains a png
image file and an mp4
video file. Refer to assets by using the relative paths. For example, refer to
../assets/img.png
if you want to use the img.png
file within the assignment.md
file. The ../
part of the path tells to go up one directory and from there the assets/
part tells to go to the assets
subdirectory. You can also create nested folders inside the assets directory to keep them organized.
Windows ⇨ backslash as directory separator
When working from a Windows machine, use the backslash as the directory separator in your relative path— for example,
..\assets\img.png
. Otherwise, you will get an error stating that your asset does not exist when pushing your track to the Instruqt platform.Your assets are also pushed when you push a track to the Instruqt platform. And the relative paths to images and videos are converted to fully qualified URLs. So they can be viewed in the sandbox by your learners.
For example, if your local track has this code in an
assignment.md
file:
The
instruqt track push
command automatically converts this to:
This example embeds a video in a challenge note. Notice the relative path format on line 12 of the
assignment.md
file:YAML/Markdown
---
slug: title
id: un6vygpcp3mj
type: challenge
title: Title
tabs:
- title: Challenge title
type: website
url: https://google.com
notes:
- type: video
url: ../assets/video.mp4
difficulty: basic
timelimit: 600
---
See the video URL on line 12 of this file.
This example embeds an image in the track description. Notice how there is only a single dot before the slash
./
which means the assets
directory is in the current directory:YAML/Markdown
slug: my-new-track
id: 7gespmlsjdzq
type: track
title: Track Title Here
teaser: This is the best track ever!
description: |-
Want to put an image in your track description? It's easy:

Last modified 11mo ago