From 0485ff61a406b3e29ad5669a8a1a5f250aafe59c Mon Sep 17 00:00:00 2001 From: Gabor Nagy Date: Fri, 23 Mar 2018 13:33:26 +0000 Subject: Make main menu optional. (#1) Building the site fails if the menu is not defined in the config, because the `header.html` references `.Site.Menus.main`. It can be made optional by using the `with` helper. --- layouts/partials/header.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index caa698f..34fd729 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -3,12 +3,14 @@ {{ .Site.Title }} + {{with .Site.Menus.main}} + {{end}} -- cgit v1.2.3