Chirun Markdown Extensions#

The flavour of Markdown used in Chirun is Python Markdown with PyMdown Extensions and some further Chirun Extensions.

Chirun-specific extensions are described below.

Including images#

Include images by using the filename path relative to the source document. Chirun will detect images included in this way and will copy them to the output directory automatically. Attribute Lists can be used to customise image style.

![A plot of y=sin(x)](images/lecture_sine2.png){width="70%"}

Markdown slides#

Slides can be written in Markdown and converted to a continuous HTML page, HTML slides and printable PDF by creating a Slides item type.

Individual slides should be separated by a line containing three dash characters, ---, and surrounded by at least one blank line on each side.

An example of Markdown slides for Chirun can be found in the sample course.

The source document for the above Markdown slides can be found on GitHub at

Embedding other content#


A Numbas exam can be embedded into a document with the <embed-numbas> tag:

<embed-numbas data-url=""></embed-numbas>


A YouTube video be embedded into a document with the <youtube-embed> tag:

<youtube-embed data-id="EdyociU35u8"></youtube-embed>




The YouTube video ID


A Vimeo video be embedded into a document with,

<vimeo-embed data-id="8169375"></vimeo-embed>




The Vimeo video ID


Chirun supports embedding content with providers that support oEmbed.

<oembed data-url="[...]"></oembed>




The URL of the oEmbed compatible content to be embedded

Code blocks#

Code blocks with syntax highlighting can be included using SuperFences.

This example shows two different ways to include code blocks. The first is a code block set to use Python syntax highlighting. The second code block also displays Python code, but also includes a button that can be clicked to show the output from running the code.

### Print statements

print("Hello", "World")

### If statements

```runnable lang="python"
x = 2
if x > 0:
    print('it is true')