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

gitlab.com/toryanderson/hugo-icarus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordigitalcraftsman <digitalcraftsman@protonmail.com>2016-12-14 01:21:35 +0300
committerdigitalcraftsman <digitalcraftsman@protonmail.com>2016-12-14 01:21:35 +0300
commit8d7dd851703fcddf0c89f774265caf24cdfeade3 (patch)
treee7302096341b4b4bef6897a67c22a62a1f78a728 /layouts
parentf23e973f7f1891e8c95dbce616944b6dce6e71dc (diff)
Filter Google search results based on baseurl
Previosly, the theme didn't limited the search results only to the Hugo website. This happened because the "site:" filter was passed as a wrong url parameter. Fixes #60
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/header.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index dff38db..2249ec5 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -34,7 +34,7 @@
<input type="search" name="q" class="search-form-input" placeholder="{{with .Site.Data.l10n.search.placeholder}}{{.}}{{end}}">
<button type="submit" class="search-form-submit">
</button>
- <input type="hidden" name="q" value="site:{{ .Site.BaseURL }}">
+ <input type="hidden" name="sitesearch" value="{{ .Site.BaseURL }}" />
</form>
</div>
</div>
@@ -61,7 +61,7 @@
<td>
<form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form">
<input type="search" name="q" class="search-form-input" placeholder="Search">
- <input type="hidden" name="q" value="site:{{ .Site.BaseURL }}">
+ <input type="hidden" name="sitesearch" value="{{ .Site.BaseURL }}" />
</form>
</td>
</tr>