hugo-whisper-theme/exampleSite/content/docs/configure/index.md

53 lines
869 B
Markdown
Raw Normal View History

2019-02-17 06:55:16 +00:00
---
title: 'Configuration'
date: 2019-02-11T19:30:08+10:00
draft: false
weight: 4
---
2019-02-17 08:43:41 +00:00
## Syntax Highlighting
2019-02-17 06:55:16 +00:00
2019-02-17 08:43:41 +00:00
Whisper uses the in-built code highlighting that ships with hugo. https://gohugo.io/content-management/syntax-highlighting/
2019-02-17 06:55:16 +00:00
2019-02-17 08:43:41 +00:00
You can insert code snippets in any markdown file by using standard code fences syntax ie:
````
```
insert code here
2019-02-17 06:55:16 +00:00
```
2019-02-17 08:43:41 +00:00
````
You can specify the langauge by adding a declaration after the backticks
````
```javascript
insert code here
2019-02-17 06:55:16 +00:00
```
2019-02-17 08:43:41 +00:00
````
2019-02-17 06:55:16 +00:00
2019-02-17 08:43:41 +00:00
### Pygments Options
2019-02-17 06:55:16 +00:00
2019-02-17 08:43:41 +00:00
The following code highlighting options are configured in the `config.toml`
2019-02-17 06:55:16 +00:00
2019-02-17 08:43:41 +00:00
```toml
pygmentsCodeFences = true
pygmentsCodefencesGuessSyntax = true
pygmentsUseClasses = true
2019-02-17 06:55:16 +00:00
```
2019-02-17 08:43:41 +00:00
## Main menu
Configure the main menu by editing the `config.toml`
```toml
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "Docs"
url = "/docs/"
weight = 2
2019-02-17 06:55:16 +00:00
```