我想在一个域中合并 2 个 Gatsby 站点,例如 mydomain.com 中的 Gatsby1(登录页面)和 mydomain.com/blog 中的 Gatsby2(博客),我该怎么做?
问问题
291 次
1 回答
1
创建两个 Gatbsy 项目。一个可以从根配置mydomain.com
。需要使用路径前缀:
gatsby-config.js
module.exports = {
pathPrefix: `/blog`,
}
构建时,您需要使用标志:gatsby build --prefix-paths
.
于 2020-02-15T18:00:25.360 回答