diff options
author | key-amb <yasutake.kiyoshi@gmail.com> | 2017-01-07 08:52:10 +0300 |
---|---|---|
committer | key-amb <yasutake.kiyoshi@gmail.com> | 2017-01-07 08:52:10 +0300 |
commit | 67c7103921d74a8e2b4788e28f043524236526c8 (patch) | |
tree | bdc69eb1df11f10a21bd43b2e49fb7e1920b03f4 | |
parent | 0a87855fc13c1d2b4d94c81c9ad0296f11bfccf9 (diff) |
Fix for Hugo v0.18 / .Site.Params "mainMenu" is not accessible now
See #18
-rw-r--r-- | layouts/index.html | 6 | ||||
-rw-r--r-- | layouts/partials/header.html | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/layouts/index.html b/layouts/index.html index f85fbd3..d02cee9 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,7 +7,7 @@ <!-- Main jumbotron for a primary marketing message or call to action --> <div class="jumbotron"> <h1>{{ .Site.Title }}</h1> - <p>{{ if isset .Site.Params "description" }}{{ .Site.Params.description }}{{ else }}You can customize this text by params "description" in your <code>config.toml</code>.{{ end }}</p> + <p>{{ if .Site.Params.description }}{{ .Site.Params.description }}{{ else }}You can customize this text by params "description" in your <code>config.toml</code>.{{ end }}</p> </div> </div> @@ -41,7 +41,7 @@ </div> </div> -{{ if isset .Site.Params "withSitePosts" }} +{{ if .Site.Params.withSitePosts }} <hr /> <div class="row doc-main text-center"> @@ -51,4 +51,4 @@ </main> -{{ partial "footer.html" . }}
\ No newline at end of file +{{ partial "footer.html" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 058fe09..6b3e609 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -9,7 +9,7 @@ <link rel="icon" href="{{ $baseUrl }}/favicon.ico"> <title>{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}</title> <!--<link href="http://fonts.googleapis.com/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css">--> - <link rel="stylesheet" href="{{ $baseUrl }}/css/highlight/{{ if isset .Site.Params "highlightStyle" }}{{ .Site.Params.highlightStyle }}{{ else }}default{{ end }}.css"> + <link rel="stylesheet" href="{{ $baseUrl }}/css/highlight/{{ if .Site.Params.highlightStyle }}{{ .Site.Params.highlightStyle }}{{ else }}default{{ end }}.css"> <link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap.min.css"> <link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="{{ $baseUrl }}/css/theme.css"> @@ -33,14 +33,14 @@ <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li {{ if eq $isHomePage true }}class="active"{{ end }}><a href="{{ $baseUrl }}/">Home</a></li> - {{ if isset .Site.Params "mainMenu" }} + {{ if .Site.Params.mainMenu }} {{ $url := .Permalink }} {{ range $menu := .Site.Params.mainMenu }} {{ $itemUrl := printf "%s/%s/" $baseUrl $menu.link }} <li {{ if eq $url $itemUrl }}class="active"{{ end }}><a href="{{ $baseUrl }}/{{ $menu.link }}">{{ $menu.name }}</a></li> {{ end }} {{ end }} - {{ if isset .Site.Params "noCategoryLink" }}{{ else }} + {{ if .Site.Params.noCategoryLink }}{{ else }} <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Categories<span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> |