0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Next.js に Bing Custom Search の Hosted UI を埋め込む

Posted at

SSRでやるべきことではないはずだし、一時的なものだがググっても出なかったので。

import Script from 'next/script'として大文字の<Script>でやっても、</body>タグ直前に検索フォームは出るが検索はできない。通常の小文字の<script>タグを使い、閉じタグ?の</script>を消して<script src="" />という形にすると上手く行った。

index.tsx
          <script type="text/javascript" 
              id="bcs_js_snippet"
            src="https://ui.customsearch.ai/api/ux/rendering-js?customConfig=xxx&market=ja-JP&version=latest&q=&setLang=JA&safeSearch=Strict"
          />
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?