Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
Add a class name for the DocSearch crawlers
Browse files Browse the repository at this point in the history
As mentioned in the DocSearch signup message: gatsbyjs#3097 (comment)
  • Loading branch information
m-allanson committed Jan 18, 2018
1 parent 97c3f1b commit bc8822d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions www/src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class DefaultLayout extends React.Component {
this.props.location.pathname.slice(0, 10) === `/packages/` ||
this.props.location.pathname.slice(0, 10) === `/tutorial/` ||
this.props.location.pathname.slice(0, 9) === `/features`
const isSearchSource = hasSidebar
const sidebarStyles = {
borderRight: `1px solid ${colors.b[0]}`,
backgroundColor: presets.sidebar,
Expand Down Expand Up @@ -135,6 +136,7 @@ class DefaultLayout extends React.Component {
paddingLeft: hasSidebar ? rhythm(12) : 0,
},
}}
className={isSearchSource && `docSearch-content`}
>
{this.props.children()}
</div>
Expand Down

0 comments on commit bc8822d

Please sign in to comment.