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

github.com/progrhyme/hugo-theme-bootie-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIKEDA Kiyoshi <yasutake.kiyoshi@gmail.com>2017-01-10 18:39:34 +0300
committerGitHub <noreply@github.com>2017-01-10 18:39:34 +0300
commit3a4503d134b521f89ecc243de476e640fbe42a37 (patch)
tree9c54f10aee0f5ae8d9ba5a34256f4137f8eef38b
parent0a87855fc13c1d2b4d94c81c9ad0296f11bfccf9 (diff)
parentead12ff1a807110344563df111ee76f6d6e1ad75 (diff)
Merge pull request #19 from key-amb/maint
Fix #18 / .Site.Params "fooBar" is not accessible for Hugo v0.18
-rw-r--r--layouts/index.html9
-rw-r--r--layouts/partials/header.html14
2 files changed, 12 insertions, 11 deletions
diff --git a/layouts/index.html b/layouts/index.html
index f85fbd3..fd88c0d 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>{{ with .Site.Params.description }}{{ . }}{{ else }}You can customize this text by params "description" in your <code>config.toml</code>.{{ end }}</p>
</div>
</div>
@@ -41,14 +41,15 @@
</div>
</div>
-{{ if isset .Site.Params "withSitePosts" }}
+{{ $title := .Site.Title }}
+{{ with .Site.Params.withSitePosts }}
<hr />
<div class="row doc-main text-center">
- <a href="{{ $baseUrl }}/post">See posts for {{ .Site.Title }}</a>
+ <a href="{{ $baseUrl }}/post">See posts for {{ $title }}</a>
</div>
{{ end }}
</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..f101804 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/{{ with .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" }}
- {{ $url := .Permalink }}
- {{ range $menu := .Site.Params.mainMenu }}
+ {{ $url := .Permalink }}
+ {{ with .Site.Params.mainMenu }}
+ {{ range $menu := . }}
{{ $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 not .Site.Params.noCategoryLink }}
<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">
@@ -51,10 +51,10 @@
</li>
{{ end }}
</ul>
- {{ if .Site.Params.searchDomain }}
+ {{ with .Site.Params.searchDomain }}
<form class="navbar-form navbar-left" role="search" action="https://www.google.co.jp/search" method="get">
<div class="input-group doc-search-form">
- <input type="hidden" name="as_sitesearch" value="{{ .Site.Params.searchDomain }}">
+ <input type="hidden" name="as_sitesearch" value="{{ . }}">
<input type="text" name="as_q" class="search-query doc-search-input-text" placeholder="Search Site">
<span class="input-group-addon input-group-btn doc-search-input-btn">
<button class="btn" type="submit"><span class="glyphicon glyphicon-search"></span></button>