I've been blogging for quite a while now. And, as much as I try to, I simply can't keep all of it in my head. In fact, that's one of the major benefits of blogging - being able to create a sort-of "scratch disk" for my tiny caveman brain. So, I often find myself searching my own blog archive for examples and code-snippets that I want to use in my work. Normally, I do this by adding
site:bennadel.com before my Google search; however, I recently learned that I could make this even easier by adding my own Blog as a custom search engine in Google Chrome's OmniBox.
Ultimately, what this allows me to do is type
ben in the Google Chrome OmniBox (ie, Location / URL bar) before my search query, and narrow Google's search down to my site:
To do this, I went into the my Chrome Settings -
CMD+, - and went to the "Search Engines" section and clicked on "Manage Search Engines":
This brings up a list of all the configured search engines, which are nothing more than a combination of keyword-triggers and resulting search strings. To add my own blog to this list, I clicked on Add and entered
ben as the trigger:
Then, as the Search Engine URL, I entered:
This is, essentially, the search that I used to run with
site:bennadel.com as the first part of the query term. In this URL, the
%s will be replaced with the query that I enter in Google Chrome's OmniBox / Location Bar.
So now, if I want to search my own blog in Google Chrome, I simply do:
CMD+L- focuses the OmniBox / Location bar.
Tab- triggers the custom search engine context.
- Type the rest of my query.
Enter- executes the Google Search on
I know this is a silly thing; but, honestly, it's a really nice micro-optimization. I do search my own site a lot looking for old posts and this will make it a seamless gesture. And, of course, you could set up any site as the context for a constrained search. For example, I just added the Mozilla Developer Network to trigger with
mdn and run a query for:
Now, if I search for something like
mdn ClipboardEvent, it will constrain my resulting search to the Mozilla Developer site. Which, let's face it, is like 50% of all my queries.
This. Is. Insane. I slapped my forehad... I did know this feature existed. I did have this problem of searching the docs for a handful of libraries all the time. It did physically hurt to see Google results page every time. And yet I was mindlessly suffering until you brought light into my life.
Ha ha, glad to have shed some light. I am loving this feature. I've already used
mdn xxxx like 15-times since I posted this :D
I tried to search something on your page and couldn't find any dedicated page. So I used google search to restrict it your website. Which lead me to this article.
I also use the search page of my website when I need to search. But now I found out that it's much easier to add Search Engine entry. May be this is the reason you don't have a dedicated search page.
I used to have a dedicated search. But, it was nowhere near as good as what Google offered since I was basically just using
LIKE in the database to do the searching. Google is so much more robust.