Cheat Sheet
Remember that you can combine all features shown below.
Override the language name
```python,lang=mojo
def greet():
print("Hello World")
```
becomes
def greet():
print("Hello World")
It's always a good idea to manually specify the language with the lang
key because highlightjs
might assign the entire family of the language. For example if you use toml
as the language,
whichlang might use INI
as the language.
Disable language detection
Because whichlang always infers the language by the code block's class name which may even be
set when you didn't specify a language, you can disable language detection by using nolang
:
```toml,nolang
[player]
name = "John"
```
becomes
[player]
name = "John"
Override the language icon
```python,icon=.devicon-python-plain
def greet():
print("Hello World")
```
becomes
def greet():
print("Hello World")
You can read more in this chapter.
Classes
You can set multiple classes to create an icon out of it. This mechanic is used by many tools such as FontAwesome. Each class must be prefixed by a period and must not be separated by spaces.
URL or Path
icon=@url/to/icon.svg
Set the file path
```python,filepath=path/to/file.py
def greet():
print("Hello World")
```
becomes
def greet():
print("Hello World")