Roots Discourse

Subfolder, submodule?

We have a main public marketing website not built on WordPress. Thats not going to change. However I am building out a blog portion in WordPress and it will site at example.com/blog rather than a subdomain.

I am trying to figure out a good way to structure this as I don’t want to clutter up the public marketing site repo. That and the site is not a totally different platform. Different build process etc… But having the blog in a subfolder is still a requirement…

So I thought about having it as a new git repo and make it a submodule of the main marketing site. Then when deploying that, it has its own deploy process and just does so in the sub folder. The main site project can ignore the /blog sub folder.

Does anyone else have a thought on a good way to handle this or does this sounds reasonable?

Is there a reason that the projects need to be connected? Are they sharing code?

If you want them to be separate repo’s with different build processes, then why not just do that? On deployment of the blog, couldn’t you have it in a separate folder and add a symlink from the main site to the WP code? I would investigate something like that off the top of my head.

Hmm thats a good question. I guess they don’t have to be do they. Thanks!