From aa7bd1152217dafe242311c70f78584ed763fd66 Mon Sep 17 00:00:00 2001 From: Rassie Smit Date: Thu, 17 Nov 2016 10:04:14 +0000 Subject: [PATCH] Add custom navbar support - default behaviour is backward compatible: all non-post pages - optionally enable custom navbar using hugo menu functionality --- exampleSite/config.toml | 19 ++++++++++++++++++- layouts/_default/baseof.html | 10 ++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6060726..5a57523 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,5 +1,5 @@ # Hugo variables -# +# baseurl = "https://example.org/" languageCode = "en-us" title = "Hugo Bootstrap v4 Blog" @@ -23,6 +23,14 @@ paginate = 5 name = "Link 2" url = "https://example.org" +# custom navbar menu entry. See the custom_navbar parameter below for +# details. + +#[[menu.navbar]] +# name = "Link 1" +# url = "https://example.org" + + # Theme variables # [params] @@ -51,6 +59,15 @@ paginate = 5 #cookie_consent_info_url = "/cookie-information/" #cookie_consent_info_url = "http://cookiesandyou.com" + # customise the contents of the navbar at the top of the page. The default + # behaviour is to list all static pages not in the posts directory. When the + # parameter below is set to true you will have to manually add entries to the + # navbar, either by adding the following menu variable to the front matter of + # the relevant pages + # menu = "navbar" + # or by specifying menu entries in a similar way to the sidebar menu above. + #custom_navbar = true + [params.sidebar] # Optional about block for sidebar (can be Markdown) about = "A simple Hugo theme based on the [Bootstrap v4 blog example](http://v4-alpha.getbootstrap.com/examples/blog/)." diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c8449d1..721180d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -31,8 +31,14 @@