diff options
author | Stephen Jung <tummychow511@gmail.com> | 2020-03-29 22:53:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-29 22:53:03 +0300 |
commit | 72aefc1d48448e2adfd50384d8203c0122c86fda (patch) | |
tree | 4fb3f7df5b556752a665724a003071d59ca15a19 | |
parent | f21b74d1b81397a60023f0230158a28024a36220 (diff) | |
parent | 31a90b83f89812deaad5a6dcfc5d22b149dacbf9 (diff) |
Merge pull request #30 from bhavin192/geeksocket-changes
Add example use of Menu Templates to exampleSite
-rw-r--r-- | exampleSite/config.json | 15 | ||||
-rw-r--r-- | exampleSite/content/fixed/mpage.md | 12 |
2 files changed, 27 insertions, 0 deletions
diff --git a/exampleSite/config.json b/exampleSite/config.json index 07402ca..e1f6e17 100644 --- a/exampleSite/config.json +++ b/exampleSite/config.json @@ -25,11 +25,26 @@ "pygmentsuseclasses": true, + "menu": { + "main": [ + { + "identifier": "categories", + "name": "Categories Section from Menu", + "title": "Categories section", + "url": "/categories/", + "weight": -110 + } + ] + }, + "params": { "Title": "Lanyon", "Tagline": "A Jekyll theme", "Author": "Mark Otto", "DateForm": "Jan 2 2006", + "mainSections": [ + "post" + ], "Github": { "Url": "http://github.com/tummychow/lanyon-hugo", "Head": "master" diff --git a/exampleSite/content/fixed/mpage.md b/exampleSite/content/fixed/mpage.md new file mode 100644 index 0000000..f551784 --- /dev/null +++ b/exampleSite/content/fixed/mpage.md @@ -0,0 +1,12 @@ +{ + "title": "A Menu Page Using Hugo Menu Templates", + "linktitle": "A Menu Page", + "menu": { + "main": { + "title": "View menu page", + "weight": -120 + } + } +} + +This is example of a page from site menu. Pages from 'main' menu appear just above the fixed pages from sidebar. Checkout official documentation about [Menu Templates](https://gohugo.io/templates/menu-templates/). |