diff options
author | sudorook <daemon@nullcodon.com> | 2018-11-28 05:28:58 +0300 |
---|---|---|
committer | sudorook <daemon@nullcodon.com> | 2018-11-28 05:28:58 +0300 |
commit | 5a52e9c6b26e04bc2f4e8ffccc7b2531dd4b4aca (patch) | |
tree | 6e3febf77d7be3b207ccee425914e529378775aa | |
parent | 55e608b6d3715aed3c6d7aa9367bfb2fe2b047f8 (diff) |
Allow users to use their favorite search engine.
Set in the config.toml (default is DuckDuckGo):
[params]
searchURL = "<baseurl>"
-rw-r--r-- | layouts/partials/footer.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index af51abc..2f48f65 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -17,7 +17,9 @@ <div class="level-left has-text-centered"> <div class="level-item"> <form class="control has-icon has-icon-right" method="get" - action="https://duckduckgo.com"> + action="{{ if .Site.Params.searchURL }}{{ .Site.Params.searchURL }} + {{- else }}https://duckduckgo.com + {{- end }}"> <input class="input" type="text" name="q" maxlength="255" placeholder="Search"> <input class="input" type="hidden" name="sites" value="{{ .Site.BaseURL }}"> |