2009-06-11

is there a way to put a simple google search box for a site?

2009-06-11

Hi guys,

How to put a simple google search box on my website?
I know some solutions, but not satisfied, so please bear with me a bit.

if you look at this page
http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

you'll see a neat search box at the top right. Simply a field, a search button, followed by a text “powered by Google”.

I want that on my website for searching my website.

I know about Google Custome Search, but after trying with a bit, the result is not what i wanted. (it has too many adds, links distractions)

So, my question is, is it possible, to put a simple looking google search widged for my own website?

Here's some more detail... a little rant, on this issue, for those more curious. But my main question is just stated above.

• Google Custome Search
http://xahlee.org/js/google_search.html

Thanks a lot! I really love Google's technologies, as well as the company etho.

(PS i'm reasonably a close follower of google webmaster blogs and webmaster tools, analytics... did some 5 min search here before posting but didn't find answer.)

Xah
∑ http://xahlee.org/



Hi Jonathan,

a little follow up...

(1) is there a way to set the width of that search box?
I am able to modify the width:100%; to 40%, however, that means all search results will also be 40% width.

(2) Is there a way to hardcode the domain that will be searched?
Because i have some projects (such as tech docs or classical literature) that also comes in downloaded version. When people view the downloaded version offline, the search box will no longer confine the search on my domain.

e.g.
• GNU Emacs Lisp Reference Manual
http://xahlee.org/elisp/index.html

• The Arabian Nights
http://xahlee.org/p/arabian_nights/index.html

(3) another extra question i'm wondering is, if it is possible to make the search box confined into a particular dir. For example like the above 2 projects, it'd be more useful for readers to search only on those docs.

Thanks a lot if you have few minute for answer.

Xah

No comments:

Post a Comment