Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/tummychow/lanyon-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhavin Gandhi <bhavin7392@gmail.com>2020-03-29 19:20:51 +0300
committerBhavin Gandhi <bhavin7392@gmail.com>2020-03-29 20:03:39 +0300
commit31a90b83f89812deaad5a6dcfc5d22b149dacbf9 (patch)
tree4fb3f7df5b556752a665724a003071d59ca15a19
parentf21b74d1b81397a60023f0230158a28024a36220 (diff)
Add example use of Menu Templates to exampleSite
Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
-rw-r--r--exampleSite/config.json15
-rw-r--r--exampleSite/content/fixed/mpage.md12
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/).