From 2088c9a0cb5e41554ad450a464b54f4c628e712b Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Wed, 12 Feb 2020 22:12:41 +0100 Subject: Add support for hugo menus --- exampleSite/config.toml | 12 ++++++++++++ exampleSite/config.yaml | 10 ++++++++++ exampleSite/content/menu/index.md | 1 - exampleSite/content/posts/_index.md | 6 ++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 exampleSite/content/posts/_index.md (limited to 'exampleSite') diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 7fe97ac..65c9f0e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -36,6 +36,18 @@ enableGitInfo = true contentDir = 'content.cn' weight = 3 +[menu] +# [[menu.before]] +[[menu.after]] + name = "Github" + url = "https://github.com/alex-shpak/hugo-book" + weight = 10 + +[[menu.after]] + name = "Hugo Themes" + url = "https://themes.gohugo.io/hugo-book/" + weight = 20 + [params] # (Optional, default true) Controls table of contents visibility on right side of pages. # Start and end levels can be controlled with markup.tableOfContents setting. diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 889f96b..3c9cb45 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -34,6 +34,16 @@ languages: contentDir: content.cn weight: 3 +menu: + # before: [] + after: + - name: "Github" + url: "https://github.com/alex-shpak/hugo-book" + weight: 10 + - name: "Hugo Themes" + url: "https://themes.gohugo.io/hugo-book/" + weight: 20 + params: # (Optional, default true) Controls table of contents visibility on right side of pages. # Start and end levels can be controlled with markup.tableOfContents setting. diff --git a/exampleSite/content/menu/index.md b/exampleSite/content/menu/index.md index d5e9807..4241df7 100644 --- a/exampleSite/content/menu/index.md +++ b/exampleSite/content/menu/index.md @@ -1,6 +1,5 @@ --- headless: true -bookMenuLevels: 1 --- - [**Example Site**]({{< relref "/docs/example" >}}) diff --git a/exampleSite/content/posts/_index.md b/exampleSite/content/posts/_index.md new file mode 100644 index 0000000..996c430 --- /dev/null +++ b/exampleSite/content/posts/_index.md @@ -0,0 +1,6 @@ +--- +menu: + after: + weight: 5 +title: Blog +--- -- cgit v1.2.3