From 6afe0cc474c23f946aac6d37442fa15ebb070327 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Thu, 16 Feb 2017 09:38:06 +0100 Subject: [PATCH] [web] Added submenu instructions. --- web/README.md | 23 +++++++++++++++++++ .../elliptic/groundwater-flow-dirichlet.md | 1 - 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/web/README.md b/web/README.md index 67d54effcae..2c6a7fbe62c 100644 --- a/web/README.md +++ b/web/README.md @@ -59,6 +59,29 @@ hugo new --kind benchmark docs/benchmarks/elliptic/groundwater-flow-dirichlet.md - `--kind` is one the `archetypes/*` - path is relative to `content/` and determines the URL of the page +### Setup navigation for a page + +The are submenus (shown in the left sidebar) for specific sections such as for benchmarks. The submenus consist of groups (e.g. *Elliptic*) and page entries. Groups are defined in `config.toml`: + +```toml +[[menu.benchmarks]] + name = "Elliptic" + identifier = "elliptic" + weight = 1 +``` + +To add your page to a group as an entry add the following frontmatter: + +```toml +weight = 101 + +[menu] + [menu.benchmarks] + parent = "elliptic" +``` + +`weight` specifies the order of groups and pages in ascending order (top -> down). + ### Images Use shortcode `img`: diff --git a/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet.md b/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet.md index 27f709c284d..0d1220ecd3c 100644 --- a/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet.md +++ b/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet.md @@ -9,7 +9,6 @@ aliases = [ "/docs/benchmarks/" ] # First benchmark page [menu] [menu.benchmarks] - # weight = 101 parent = "elliptic" +++ -- GitLab