Title here
Summary here
Use fenced code blocks to display source code. Add a language identifier after the opening backticks for syntax highlighting.
```js
const message = "Hello, Doks!";
console.log(message);
```No additional page or site settings are required.
Use a language identifier to enable syntax highlighting.
const message = "Hello, Doks!";
console.log(message);```js
const message = "Hello, Doks!";
console.log(message);
```Code blocks with a title use an editor-style frame. The renderer uses a terminal-style frame for bash, sh, shell, and powershell.
const message = "Hello, Doks!";
console.log(message);```js {title="app.js"}
const message = "Hello, Doks!";
console.log(message);
```npm install```bash {title="Install dependencies"}
npm install
```To hide the frame, set frame="none":
npm install```bash {frame="none"}
npm install
```Use lineNos=true to show line numbers. Set the first number with lineNoStart.
10const message = "Hello, Doks!";
11console.log(message);```js {lineNos=true lineNoStart=10}
const message = "Hello, Doks!";
console.log(message);
```Use hl_lines to highlight one or more lines.
1package main
2
3import "fmt"
4
5func main() {
6 fmt.Println("Hello, Doks!")
7}```go {lineNos=true hl_lines=[3]}
package main
import "fmt"
func main() {
fmt.Println("Hello, Doks!")
}
```Hugo guide to highlighting fenced code blocks and configuring code block options.