From 4e014f1d44ca45172f7f3fbd9c8cbc4c7e6a6ab0 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Wed, 22 Jul 2020 20:42:45 +0200 Subject: Fix #10 - add more documentation about table of content --- README.md | 18 ++++++++++++++++++ config.toml.example | 5 +++++ exampleSite/config.toml | 6 ++++++ 3 files changed, 29 insertions(+) diff --git a/README.md b/README.md index 7d1da8e..8b9e2ae 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,24 @@ git clone https://github.com/blankoworld/hugo_theme_adam_eve.git Check [Hugo Installation Guide](https://gohugo.io/getting-started/installing/) for more information. +## Configuration + +It's hardly recommended to check the `config.toml.example` file. Especially to configure the table of content via `[markup]` section, the name of each menu and some other example. + +### Table of content + +To configure the table of content, edit your `config.toml` file and add something like: + +```toml +[markup] + [markup.tableOfContents] + endLevel = 6 + ordered = false + startLevel = 1 +``` + +It means you start the Table of Content from `h1` to `h6`. You can find [more info about table of content configuration on official Hugo documentation](https://gohugo.io/getting-started/configuration-markup/#table-of-contents). + ## Getting Started ### The config file diff --git a/config.toml.example b/config.toml.example index e1d1ac0..be710a0 100644 --- a/config.toml.example +++ b/config.toml.example @@ -31,3 +31,8 @@ description = "Sharing knowledge wiki" identifier = "homepage" url = "/" +[markup] + [markup.tableOfContents] + endLevel = 6 + ordered = false + startLevel = 1 diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 5443043..373abb7 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -17,3 +17,9 @@ description = "Des poissons et de l'eau" [Languages.en.params] description = "Fish and water" + +[markup] + [markup.tableOfContents] + endLevel = 6 + ordered = false + startLevel = 1 -- cgit v1.2.3