There was an error while loading. Please reload this page.
1 parent a9247db commit 998f7c8Copy full SHA for 998f7c8
1 file changed
examples/react/start-basic-netlify/src/utils/seo.ts
@@ -11,15 +11,19 @@ export const seo = ({
11
}) => {
12
const tags = [
13
{ title },
14
- { name: 'description', content: description },
15
- { name: 'keywords', content: keywords },
+ ...(description ? [{ name: 'description', content: description }] : []),
+ ...(keywords ? [{ name: 'keywords', content: keywords }] : []),
16
{ name: 'twitter:title', content: title },
17
- { name: 'twitter:description', content: description },
+ ...(description
18
+ ? [{ name: 'twitter:description', content: description }]
19
+ : []),
20
{ name: 'twitter:creator', content: '@tannerlinsley' },
21
{ name: 'twitter:site', content: '@tannerlinsley' },
22
{ property: 'og:type', content: 'website' },
23
{ property: 'og:title', content: title },
- { property: 'og:description', content: description },
24
25
+ ? [{ property: 'og:description', content: description }]
26
27
...(image
28
? [
29
{ name: 'twitter:image', content: image },
0 commit comments