# Add cmake.org as a search engine?

**URL:** https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596
**Category:** Site Feedback
**Created:** [July 21, 2020, 1:54am UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596 "2020-07-21T01:54:59Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![anon45792294](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anon45792294](https://discourse.cmake.org/u/anon45792294)
#### Post date: [July 21, 2020, 1:54am UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/1 "2020-07-21T01:54:59Z")

</div>

I often need to look stuff up in cmake.

It would be really nice if I could add cmake as a search engine in my browser.

Example:  
 ![image](https://discourse.cmake.org/uploads/default/original/1X/30bbc0494245a2c21f00e40900c0267a16c95127.png)

[cppreference.com](http://cppreference.com) ([https://en.cppreference.com/w/Main\_Page](https://en.cppreference.com/w/Main_Page)) offers this functionality and I think it would be a really nice quality of life.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [July 21, 2020, 1:08pm UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/2 "2020-07-21T13:08:34Z")

</div>

The documentation at [https://cmake.org/cmake/help/latest/](https://cmake.org/cmake/help/latest/) offers a “Quick search” bar on the left hand side. Is this what you’re looking for?

---

<div class="post-metadata">

### Author: ![anon45792294](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anon45792294](https://discourse.cmake.org/u/anon45792294)
#### Post date: [July 23, 2020, 12:41am UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/3 "2020-07-23T00:41:24Z")

</div>

No that is not what I’m looking for.

As you pointed out [cmake.org](http://cmake.org) already offers searching functionality.

What I’m asking for is the ability to add [cmake.org](http://cmake.org)’s search functionality as a search engine in browsers:

 ![image](https://discourse.cmake.org/uploads/default/original/1X/ecb453f88d00426ba083e3b4f47dddd8ac1a6274.png)

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [July 23, 2020, 1:01pm UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/4 "2020-07-23T13:01:46Z")

</div>

This would most likely involve writing a browser extension, and I don’t think we’re likely to do that (though the community is free to take a crack at it themselves if there is demand for it.)

---

<div class="post-metadata">

### Author: ![alex](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alex/32/125_2.png) [@alex](https://discourse.cmake.org/u/alex)
#### Post date: [July 23, 2020, 4:59pm UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/5 "2020-07-23T16:59:35Z")

</div>

For what it’s worth, it doesn’t require writing a browser extension. This can be done in a standard way by writing an OpenSearch description. See Mozilla’s documentation here:

> **[OpenSearch description format](https://developer.mozilla.org/en-US/docs/Web/OpenSearch)**
>
> The OpenSearch description format lets a website describe a search engine for itself, so that a browser or other client application can use that search engine.

But since you’re using Sphinx to generate the docs, I’m pretty sure you can ask it to generate the OpenSearch description _for you_:

[https://www.sphinx-doc.org/en/master/usage/configuration.html](https://www.sphinx-doc.org/en/master/usage/configuration.html)

See the `html_use_opensearch` option. It’s quite likely this would require only adding:

```auto
html_use_opensearch = 'https://cmake.org/cmake/help'

```

to `Utilities/Sphinx/conf.py.in`

---

<div class="post-metadata">

### Author: ![DaveB](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/d/b5a626/32.png) [@DaveB](https://discourse.cmake.org/u/DaveB)
#### Post date: [July 24, 2020, 5:16am UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/6 "2020-07-24T05:16:01Z")

</div>

With Chrome it’s very easy: Add a new search engine in the settings with the URL:  
[https://cmake.org/cmake/help/latest/search.html?q=%s](https://cmake.org/cmake/help/latest/search.html?q=%25s)  
Or replace _latest_ by whatever version you want.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [July 24, 2020, 2:14pm UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/7 "2020-07-24T14:14:34Z")

</div>

Very interesting, thanks. I think we’d be willing to accept such a change into CMake if someone can prove that it works - and it sounds like it wouldn’t require writing much code.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [July 24, 2020, 2:24pm UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/8 "2020-07-24T14:24:12Z")

</div>

The `html_use_opensearch` option mentioned above must be set for specific publication URLs, so I don’t think it makes sense to do that in CMake’s upstream source. Kitware uses an internal branch with a few tweaks for publication on the `cmake.org` site, so this could be added to that.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [July 29, 2020, 6:26pm UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/9 "2020-07-29T18:26:28Z")

</div>

I’ve updated the `cmake.org` docs such that starting with CMake 3.18 (currently the `latest`), the Sphinx documentation pages contain an OpenSearch description link in their header. The OpenSearch description tells browsers how to search under the Sphinx documentation for CMake’s **latest** version. Visit [https://cmake.org/cmake/help/latest/](https://cmake.org/cmake/help/latest/) with an OpenSearch-capable browser to see this in action.

---

<div class="post-metadata">

### Author: ![anon45792294](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anon45792294](https://discourse.cmake.org/u/anon45792294)
#### Post date: [July 29, 2020, 8:03pm UTC](https://discourse.cmake.org/t/add-cmake-org-as-a-search-engine/1596/10 "2020-07-29T20:03:22Z")

</div>

This is fantastic quality of life I’m extremely happy about this!  
🥳
