Code inclusion
Overview
Teaching: 0 min
Exercises: 0 minQuestions
How can I include code from an external file in my lesson
Objectives
Include external code
Code includes
Might be good for unit testing code snippets and for having syntax highlighting etc. when writing longer bits. Also great when you want to give students the opportunity to download the full files.
This is a full include:
This is a partial include with line numbers
You can also include from a string to a string:
Key Points
Put your code snippets in
_episodes/code/
There are three different ways to include code.