如何在一个域中合并2个Gatsby网站?

问题描述 投票:1回答:1

我想在一个域中合并2个Gatsby网站,例如mydomain.com中的Gatsby1(登录页面)和mydomain.com/blog中的Gatsby2(博客),我该怎么做?

gatsby netlify static-site jamstack
1个回答
0
投票

创建两个Gatbsy项目。可以从根mydomain.com配置一个。一个需要使用path prefixes

gatsby-config.js

module.exports = {
  pathPrefix: `/blog`,
}

[构建时,您需要使用标志:gatsby build --prefix-paths

© www.soinside.com 2019 - 2024. All rights reserved.