mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-25 20:48:50 +02:00
feat(v2): add custom wrapper class to search page and fix title (#3834)
* feat(V2): add custom wrapper class to SearchPage * review change * fix(V2): fix SearchPage title and Head warning
This commit is contained in:
parent
42c40f4221
commit
bb387e089f
1 changed files with 4 additions and 1 deletions
|
@ -102,6 +102,8 @@ function Search() {
|
||||||
const {
|
const {
|
||||||
siteConfig: {
|
siteConfig: {
|
||||||
themeConfig: {algolia: {appId = 'BH4D9OD16A', apiKey, indexName} = {}},
|
themeConfig: {algolia: {appId = 'BH4D9OD16A', apiKey, indexName} = {}},
|
||||||
|
title: siteTitle,
|
||||||
|
titleDelimiter,
|
||||||
} = {},
|
} = {},
|
||||||
} = useDocusaurusContext();
|
} = useDocusaurusContext();
|
||||||
const docsSearchVersionsHelpers = useDocsSearchVersionsHelpers();
|
const docsSearchVersionsHelpers = useDocsSearchVersionsHelpers();
|
||||||
|
@ -294,8 +296,9 @@ function Search() {
|
||||||
}, [searchValue]);
|
}, [searchValue]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout title={getTitle()}>
|
<Layout wrapperClassName="search-page-wrapper">
|
||||||
<Head>
|
<Head>
|
||||||
|
<title>{`${getTitle()} ${titleDelimiter} ${siteTitle}`}</title>
|
||||||
{/*
|
{/*
|
||||||
We should not index search pages
|
We should not index search pages
|
||||||
See https://github.com/facebook/docusaurus/pull/3233
|
See https://github.com/facebook/docusaurus/pull/3233
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue