Skip to content

Commit 37f3e52

Browse files
committed
Add documentation to include images in exercises.
1 parent 87c7b7f commit 37f3e52

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

demo-repository/exercises/demo/descr.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55
<h2>The task</h2>
6-
6+
<img src="/static/demo/images/OCaml.png">
77
<p>
88
In this test-bed exercise you are asked to (re)implement the basic
99
integer-arithmetic functions.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
How to include our own static content to an Exercise Statement
2+
==============================================================
3+
4+
## Context
5+
6+
If you create an exercise statement, you probably want to add your own static content such as images in an exercise statement.
7+
8+
`LearnOCaml` provides a feature to include static contents in an exercise statement. In addition to always being able to include a link to external content, it's possible to include specific static content.
9+
10+
## How-to
11+
12+
Lets see how to include `OCaml.png` in exercise `demo`.
13+
Follow these steps:
14+
15+
1. Create a directory `<repo>/exercices/demo/images`.
16+
2. Put `OCaml.png` in there.
17+
3. In `<repo>/exercises/demo/decr.html` or `<repo>/exercises/demo/descr.md`, use the following syntaxe <br> `<img src="/static/demo/images/OCaml.png">`.
18+
19+
To do this we can't use relative URLs.

0 commit comments

Comments
 (0)