CSE Support

Contents

Find out how to setup Custom Search Engine in FixIt.

What is CSE?

Custom Search Engine (CSE) lets you create a search engine for your website, your blog, or a collection of websites. You can configure your search engine to search both web pages and images. You can fine-tune the ranking, customize the look and feel of the search results etc.

Common search engines have their own CSE services, such as:

Configure CSE in FixIt

FixIt 0.3.16 | NEW

First, manually create a search result display page:

1
hugo new content search/index.md

To configure Google or Bing CSE in the FixIt theme:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
[params.search]
enable = true
type = "cse"

[params.cse]
# Search engine: ["google", "bing"]
engine = "google"
results_page = "/search/"

[params.cse.google]
cx = ""

[params.cse.bing]
cx = ""

Google CSE

Google CSE, also known as Google Programmable Search Engine, this section mainly introduces how to use Google CSE in FixIt. You can go to Programmable Search Engine Tutorial page to view the complete tutorial.

Follow the steps below to create a Google search engine:

  • Create a new search engine in Google Programmable Search Engine.
  • Enter your search engine name, for example: FixIt.
  • Select to search specific sites or pages, and enter your site URL. e.g. fixit.lruihao.cn.
  • Click the Create button.
  • After a moment, the page will prompt you: “A new search engine has been created”, then click the Customize button to enter the search engine customization page.
  • Click Appearance and Style => Layout => Select Two-column. (This step is crucial, do not ignore it!)
  • Finally, click Overview and copy your search engine ID.
  • Paste the search engine ID into the cx field in the configuration file.
  • 🎉 Congratulations! Restart the Hugo server and try the search feature.

Bing CSE

Bing Custom Search is similar to Google CSE. You can go to the Bing Custom Search page to create a custom search instance and obtain the CX ID, then configure it in params.cse.bing.cx.


Related Content

Buy me a coffee
Lruihao AlipayAlipay
Lruihao WeChat PayWeChat Pay

Update Available

A new version of this site is available.