This repository has been archived on 2022-01-14. You can view files and clone it, but cannot push or open issues/pull-requests.
nwt-docs/configuration.md

70 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2021-11-29 22:59:03 -05:00
---
title: Configuration
---
2021-11-30 10:07:29 -05:00
## config.toml
```toml
baseURL = "https://example.org/"
languageCode = "en-us"
title = "Your digital garden"
theme = ["nwt"] # you do not need this if using as a Hugo module
copyright = "(c) <your name> <year>"
enableEmoji = true
enableGitInfo = true
[author]
name = "<your name>"
[params]
favicon = "/favicon.ico" # Place in static/favicon.ico
GitRepo = "" # Your git repo URL (no trailing slash needed)
[[menu.main]]
name = "Wiki"
url = "/wiki"
weight = 100
[[menu.main]]
name = "External link"
url = "https://example.org"
weight = 200
```
## Expected files
`content/wiki/_index.md` with a `title: Index` set.
## Pinned pages
Pinned pages will show on the top menu bar after your `main` menu items. You can easily set this in the page metadata with `menu: pinned`.
## Footer pages
`menu: footer`
## Table of Contents
To enable table of contents for a pages, set `enabletoc: true`.
## Custom partials
The partial `head-custom.html` is applied after `head.html`, you can create your own copy at `layouts/partials/head-custom.html` to overwrite it.
2021-11-30 21:57:53 -05:00
## Docs/ Comments
Create a collapsible area at the bottom of the page to embed something like Etherpad, Hedgedoc, or a commenting plugin. `HUGO_ENV` must equal production to show, otherwise a message will show instead.
Overwrite this partial `layouts/partials/docscomments-content.html` with what to include.
This can be disabled on your entire site:
```toml
[params]
disableDocsComments = true
```
For a specific page: `disableDocsComments = true`