diff options
author | Rohan Verma <hello@rohanverma.net> | 2020-05-29 13:45:17 +0300 |
---|---|---|
committer | Rohan Verma <hello@rohanverma.net> | 2020-05-29 13:45:17 +0300 |
commit | 17dbebf12993d67cf3b3c91342dcf789dea60e0a (patch) | |
tree | bf0de3c0d284ce86a8e826080cad8618d18704d8 | |
parent | 5622a56797be6eac067a0432fceb4902ac0bd8cd (diff) |
fix: put disable search for examplesite
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/partials/menu.html | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 99355ed..4a375ee 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -9,6 +9,7 @@ theme = "bodhi" author = "Rohan Verma" commentoSrc = "https://commento.example.com/js/commento.js" footerMessage = "Keep it simple." + disableSearch = true [[menu.main]] name = "home" diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 39985eb..d80d71d 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -17,7 +17,9 @@ </a> {{- end -}} {{if eq $currentPage.Params.url "/search/" }}<b>{{end}} - <a href="/search">search<svg aria-hidden="true" class="i-search" viewBox="0 0 32 32" width="10" height="10" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"><circle cx="14" cy="14" r="12"></circle><path d="M23 23l7 7"></path></svg></a> + {{if and (not (isset .Site.Params "disableSearch")) (not (eq .Site.Params.disableSearch false)) }} + <a href="/search">search<svg aria-hidden="true" class="i-search" viewBox="0 0 32 32" width="10" height="10" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"><circle cx="14" cy="14" r="12"></circle><path d="M23 23l7 7"></path></svg></a> + {{end}} {{if eq $currentPage.Params.url "/search/" }}</b>{{end}} </span> </div> |