Adding DuckDuckGo Search Box to Movable Type

DuckDuckGo is a search engine startup whose claim to fame is their strict privacy policy:

DuckDuckGo does not collect or share personal information. That is our privacy policy in a nutshell. The rest of this page tries to explain why you should care.

Like most other search engines, DuckDuckGo offers a search box code snippet that can be used for site-specific search. Adding this to a Movable Type blog is very straightforward:

  1. Create your own search box on the DuckDuckGo site (make sure to add your domain in the Site Search field); copy and save the iframe code snippet
  2. Login to your Movable Type installation and navigate to the Widgets page
  3. Create a new widget named “SearchDuckDuckGo” and set the content as shown below
  4. Add the SearchDuckDuckGo widget to the appropriate widget set
  5. Rebuild your blog to see the results

The Movable Type widget code will look like the following, with the <iframe> portion copied from the DuckDuckGo site:

<div class="widget-search widget">
<h3 class="widget-header">Search
<div class="widget-content">
<iframe src="http://duckduckgo.com/..."></iframe>
</div>
</div>

If you have a little more room, you can get fancier and include the DuckDuckGo logo, or use the banner version which has a quick summary of the service:

DuckDuckGo Search Box Examples

DuckDuckGo Search Box Examples

Note: These steps were confirmed on Movable Type 4.x and should be similar on 5.x.

Posted in: Web