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:
Bartosz Kaszubowski 2020-11-27 22:50:28 +01:00 committed by GitHub
parent 42c40f4221
commit bb387e089f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,6 +102,8 @@ function Search() {
const {
siteConfig: {
themeConfig: {algolia: {appId = 'BH4D9OD16A', apiKey, indexName} = {}},
title: siteTitle,
titleDelimiter,
} = {},
} = useDocusaurusContext();
const docsSearchVersionsHelpers = useDocsSearchVersionsHelpers();
@ -294,8 +296,9 @@ function Search() {
}, [searchValue]);
return (
<Layout title={getTitle()}>
<Layout wrapperClassName="search-page-wrapper">
<Head>
<title>{`${getTitle()} ${titleDelimiter} ${siteTitle}`}</title>
{/*
We should not index search pages
See https://github.com/facebook/docusaurus/pull/3233