commit b50c83671bfc6644f41f7c64cb5aa257cc2c5ba9
parent 749b84acf23f850186732a860809e6f5c2048fa5
Author: Andrew Laack <andrew@laack.co>
Date: Thu, 27 Aug 2026 23:47:26 -0500
Make links more consistent
Diffstat:
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/courses/ocaml/0_ocaml.sl b/courses/ocaml/0_ocaml.sl
@@ -20,9 +20,9 @@ print_endline (string_of_int(factorial 6));;
```
-=>v out.webm
+=>v assets/out.webm
-=>i em.png
+=>i assets/em.png
When was ocaml created?
diff --git a/docs/sl.sl b/docs/sl.sl
@@ -10,7 +10,7 @@ The simple learning file format is intended to be a minimal but sufficient file
A parser of sl files must track one bit of state: whether the current line is contained within a preformatted text block or not. Preformatted text blocks are delimited by lines that contain precisely three ` characters, and no other characters, new line character excluded. Such blocks may be used for code or other text that requires monospace alignment, such as ASCII art.
-Outside of preformatted blocks, there are seven line types:
+Outside of preformatted blocks, there are eight line types:
- Text lines
- Text link lines
@@ -20,3 +20,5 @@ Outside of preformatted blocks, there are seven line types:
- List items
- Quote lines
- Hidden Lines
+
+While links could've be combined into one category, building alternative parsers and frontends is made much simpler by requiring users to specify what type of content they are linking to. By doing this, instructors can choose to link to external videos, or have them rendered in line.
diff --git a/learning/templates/course_page.jingoo b/learning/templates/course_page.jingoo
@@ -9,9 +9,9 @@
{% else if line.header_level >= 1 %}
<h{{line.header_level}}>{{line.content}}</h{{line.header_level}}>
{% else if line.is_embedded_image %}
- <img src=assets/{{line.content}}> </img>
+ <img src={{line.content}}> </img>
{% else if line.is_embedded_video %}
- <video> <source src="assets/{{line.content}}"> Your browser does not support the video tag. </video>
+ <video> <source src="{{line.content}}"> Your browser does not support the video tag. </video>
{% else if line.header_level == 0 %}
<content-block>{{line.content}}</content-block>
{% endif %}