Learning Paths are created using Markdown.
Refer to this section when you have questions on how to format your content correctly.
You can also refer to other Markdown resources, and if you are unsure, look this page in GitHub to see how to do formatting.
Use the quick links below to jump to the appropriate section for each type of formatting.
The most common Markdown syntax is in the table.
Element | Syntax |
---|---|
Heading 1 | # Most Important Heading |
Heading 2 | ## Second Level Heading |
Heading 3 | ### Third Level Heading |
Bold text | **bold text** |
Italic text | *Italic text* |
Code font | `code font` |
You can add code snippets in the standard markdown format. You can also add additional options for the code snippet.
Here is a simple example:
echo ‘hello world’
These are the range of options to add to a code snippet:
Add the specific language name at the start of the code snippet:
```python
print(hello world)
```
print(hello world)
```C
int foo(void){
return 0;
}
```
int foo(void){
return 0;
}
Specify that line_numbers are true in the following way:
```bash { line_numbers = “true” }
echo ‘hello world’
echo ‘I am line two’
```
echo ‘hello world’
echo ‘I am line two’
There are three ways you can specify command outputs in code:
In each of the three situations, code marked as ‘output’ will:
Keep reading to see an example of each.
Specify this case by making the language ‘output’. An example in context:
echo 'hello world'
echo 'test'
The output from the above command is:
hello world
test
Use the following syntax by specifying the output lines after a pipe as follows: { command_line=“root@localhost | 2-6” }
Example in context:
printf 'HelloWorld\n%.0s' {1..5}
HelloWorld
HelloWorld
HelloWorld
HelloWorld
HelloWorld
To place output in the same code block as the generating command, use the shortcode { output_lines = "2-3, 5, 7-11" }
styling. Note that when hitting the copy
button, only the commands are copied to the clipboard, not the specified output. For example:
echo 'hello world\nh'
__output__hello world
__output__h
echo 'one line output'
__output__one line output
printf 'outputline\n%.0s' {1..5}
__output__outputline
__output__outputline
__output__outputline
__output__outputline
__output__outputline
Add command line user context:
echo ‘hello world’
With output:
printf 'HelloWorld\n%.0s' {1..5}
HelloWorld
HelloWorld
HelloWorld
HelloWorld
HelloWorld
Adding a code pane, for code dependent on OS or architecture. Code panes are incompatible with the other forms of code styling.
Code pane example with language selector:
print('hello world')
__output__hello world
echo 'hello world'
print('hello world')*3
__output__hello world
__output__hello world
__output__hello world
print('another example')
__output__another example
echo 'hello world'
hello world
sudo apt-get install jq minicom make cmake gdb-multiarch automake autoconf libtool libftdi-dev libusb-1.0-0-dev pkg-config clang-format -y
sudo apt-get install jq minicom make gdb-multiarch automake autoconf libtool libftdi-dev libusb-1.0-0-dev pkg-config clang-format -y
sudo snap install cmake --classic
Nothing more to install!
You can add images in the standard markdown format. Provide alternative text (displayed if the image cannot load) in brackets followed by the image source and subtitle in parenthesis. Simple example:
The Markdown used to add the picture is:
![example image alt-text#center](arm-pic.png "Figure 1. Example image caption")
These are the options when adding an image:
Internal hosting is straightforward. Add the picture (.png or .jpeg format) into the Learning Path directory alongside the *.md files, and refer to it by name. This example is using ‘arm-pic.png’ which you can find in this directory:
External image referencing is also simple. Obtain the picture link and place that as the source. Example:
Left-alignment is the default image behavior. To center an image, add ‘#center’ at the end of the alt-text and the image + subtitle will render in the center of the page.
Center aligned:
Images are displayed in their specified size. To resize an image:
Use the following format to add a note / tip for a reader in a highlighted way.
{{% notice optional_title %}}
Text inside
{{% /notice %}}
Simple example:
markdown
formatting in these notices as well.You can add a custom title as well if you desire as so:
You can also give a custom title as specified here.