Custom Search Box For Discourse


(Jide Ogunsanya) #1

Please, I would like to place a search box on my blog, which can search my discourse forum.

Can I get a code I can use to achieve that?


(Sam Saffron) #2

There is an API, but this is a fairly complicated integration, especially cause you need to be careful about rate limits

You would need a developer for this

I recommend you just rely on the google widget they provide


(Dean Taylor) #3

Depending on your requirements you could implement a basic HTML form which opens the search page for your Discourse install:

<form target="_blank" action="https://meta.discourse.org/search" id="f" method="get">
  <div>
    <span>Search</span>&nbsp;<input id="q" name="q" type="text" placeholder="search topics, posts, users or categories">
  </div>
</form>

If you don’t understand this HTML code or how to add it you are going to need to look at the answer Sam provided: