Yu-Chieh’s Blog (Y.C. Chang)

Ruby on Rails / Rubygems / FullStack / Git / Mac notes.

How to Fix Simple Search of Octopress

find navigation.html in /source/_includes and replace original code with new code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
...
<form action="https://www.google.com/search" method="get">
  <fieldset role="search">
<!-- original code  -->
<!--     <input type="hidden" name="q" value="site:andystu.github.io" /> -->
<!-- //original code  -->

<!-- new code -->
    <input type="hidden" name="sitesearch" value="andystu.github.io" />
<!-- //new code -->
    <input class="search" type="text" name="q" results="0" placeholder="Search"/>
  </fieldset>
</form>
...

done.

reference http://kaspars.net/blog/wordpress/how-to-add-google-site-search

Comments