我添加了所有元标记来创建推特卡,但是当我尝试执行推特验证时,它会告诉我:信息:成功获取页面 INFO:找到3个元标记 错误:找不到卡(卡错误) 我认为我无法将所有元标记都放在meta = {[...]}中,因为它不能正常工作。
我该怎么解决?重要!!!
import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import Header from '../components/header'
import './index.css'
const Layout = ({ children, data }) => (
<div>
<Helmet
title={data.site.siteMetadata.title}
meta={[
{ name: 'description', content: data.site.siteMetadata.description },
{ name: 'keywords', content: data.site.siteMetadata.keywords },
]}
>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:description"
content="xxx"
/>
<meta
name="twitter:title"
content="xxx"
/>
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="website" />
<meta
property="og:title"
content="xxx"
/>
<meta
property="og:description"
content="xxx"
/>
<meta property="og:url" content="http://example.com/" />
<meta property="og:site_name" content="xxx" />
</Helmet>
<Header />
{children()}
</div>
)
Layout.propTypes = {
children: PropTypes.func,
}
export default Layout
export const query = graphql`
query SiteTitleQuery {
site {
siteMetadata {
title
description
keywords
}
}
}
`
信息:成功提取页面
INFO:找到3个元标记
错误:找不到卡(卡错误)