Normal usage of code block
```javascript
console.log('Hello World!');
```
You can set the code-block title and line number to $, > symbol.
```>:s22adg.sh
agasgas
```
```$:sadg.sh
agasgas
agasgas
agasgas
agasgas
agasgas
```
```:/etc/profile.java
System.out.println();
```
1
2
3
4
5
| agasgas
agasgas
agasgas
agasgas
agasgas
|
You could also do this.
```javascript:etc/dir/myscript.js
console.log('Hello World!');
```
1
| console.log('Hello World!');
|
Just keep in mind that the code block title should end with extensions. (e.g: .js
, .c
, .python
) otherwise, the code-block would not render properly
We have a code-tab shortcode
Make it easy to switch between different code
1
| System.out.println('Hello World!');
|
1
| console.log('Hello World!');
|
{{< codes java javascript >}}
{{< code >}}
```java
System.out.println('Hello World!');
```
{{< /code >}}
{{< code >}}
```javascript
console.log('Hello World!');
```
{{< /code >}}
{{< /codes >}}