Closed ulf1 closed 5 years ago
partials/header.html
... <div class="collapse navbar-collapse"> ... <div class="col-sm-3 col-md-3 pull-right"> {{ partial "search-form-google" . }} </div> ...
partials/search-form-google.html
<form class="navbar-form" role="search" action="http://www.google.com/search" method="get"> <div class="input-group"> <input type="hidden" name="q" value="site:{{ .Site.BaseURL }}"> <input class="form-control" type="text" name="q" alt="search"> <div class="input-group-btn"> <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button> </div> </div> </form>
.html
.xml
Search Engines
=> <form ... action="{{ THIS IS DIFFERENT }}" ...>
<form ... action="{{ THIS IS DIFFERENT }}" ...>
http://oxyba.de/
see in the top-right corner
Google Search Example
partials/header.html
partials/search-form-google.html
Requirements
.html
(Google, Yandex) or.xml
(Bing) in the public folderVariants
Search Engines
=>
<form ... action="{{ THIS IS DIFFERENT }}" ...>
Demo (shameless self-advertisement)
http://oxyba.de/
see in the top-right corner