Skip to content

Instantly share code, notes, and snippets.

@dhanar98
Created November 28, 2021 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhanar98/73b512f3fe5181528c3e2a8d4cf6981e to your computer and use it in GitHub Desktop.
Save dhanar98/73b512f3fe5181528c3e2a8d4cf6981e to your computer and use it in GitHub Desktop.
Sitelinks Searchbox in Next-seo
import { SiteLinksSearchBoxJsonLd } from 'next-seo';
const SiteLinksSearchBox = () => (
<>
<SiteLinksSearchBoxJsonLd
url="https://dhanar98.hashnode.dev/"
potentialActions={[
{
target: 'https://dhanar98.hashnode.dev/search?q',
queryInput: 'search_term_string',
},
{
target: 'android-app://com.example/https://dhanar98.hashnode.dev/search/?q',
queryInput: 'search_term_string',
},
]}
/>
</>
);
export default SiteLinksSearchBox;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment