你能帮我理解如何%s
引用 <SEO />
<Helmet />
中组件的标题属性 Gatsby 入门主题中的组件?
https://github.com/gatsbyjs/gatsby-starter-default/blob/master/src/components/seo.js
第 19 行:
titleTemplate={`%s | ${data.site.siteMetadata.title}`}
最佳答案
$s
是从组件的“标题” Prop 推断出来的。
以下是相关源代码的链接:
https://github.com/nfl/react-helmet/blob/b79d30ff44c7ff3c175c31059076e5e549a1b402/src/HelmetUtils.js#L27
关于javascript - s% 如何引用 Helmet 组件内的 title 属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53953820/