Skip to content

Commit 26657e0

Browse files
author
Ives van Hoorne
committed
Show catchall slogan by default for crawlers
1 parent 98d808b commit 26657e0

File tree

1 file changed

+7
-1
lines changed
  • packages/homepage/src/screens/home/Animation

1 file changed

+7
-1
lines changed

packages/homepage/src/screens/home/Animation/Title.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,20 @@ const Secondary = styled.div`
100100
${fadeIn(0.2)};
101101
`;
102102

103+
const isBot = () => {
104+
return /google|baidu|bing|msn|duckduckgo|teoma|slurp|yandex/i.test(
105+
navigator.userAgent
106+
);
107+
};
108+
103109
export default ({ template }) => (
104110
<Container>
105111
<Title title="CodeSandbox">
106112
<Secondary style={{ color: template.color() }}>Code</Secondary>
107113
<Primary>Sandbox</Primary>
108114
</Title>
109115
<SubTitle title="The online code editor tailored for web applications">
110-
{typeof window === 'undefined' ? (
116+
{typeof window === 'undefined' || isBot() ? (
111117
<span>The online code editor for web applications</span>
112118
) : (
113119
<span>

0 commit comments

Comments
 (0)