Skip to content

Instantly share code, notes, and snippets.

@ryanj
Created January 30, 2013 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ryanj/4676419 to your computer and use it in GitHub Desktop.
Save ryanj/4676419 to your computer and use it in GitHub Desktop.
full-text search box for your public static blog. just fill in YOUR_SITE_NAME
<div id='searchbox'>
<form action="http://google.com/" method="GET" onsubmit="document.getElementById('searchbox_input').value += ' site:<?= getenv('OPENSHIFT_APP_DNS'); ?>'; return true;">
  <input type="text" id="searchbox_input" name="q"/><input type="submit" value="Search"/>
</form>
</div>
<div id='searchbox'>
<form action="http://google.com/" method="GET" onsubmit="document.getElementById('searchbox_input').value += ' site:YOUR_SITE_NAME'; return true;">
  <input type="text" id="searchbox_input" name="q"/><input type="submit" value="Search">
</form>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment