Multiple sites in one repo

PLEASE help us help you by writing a good post!

Netlify site

I have two repos that I’m using to redirect traffic from an old site to a new one. Each repo has a pretty simple structure: An out/ directory with a __redirects file and a netlify.toml.

The netlify.toml looks like

base = "/"
publish = "out/"

Individually they work and accomplish what I want. I decided to consolidate the two repos and house their contents in subfolders of the new repo. I then set the base folder in the site build settings to the desired subdirectory. However, now I get “Page Not Found” when I test the redirects. It will also fail to build if I set the publish folder to <subfolder>/out in the build settings.

1:44:19 PM: Build ready to start
1:44:20 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
1:44:20 PM: build-image tag: v4.10.1
1:44:20 PM: buildbot version: fe6512288e75c8fa5aadaebb51ed1f96e9314fd4
1:44:20 PM: Fetching cached dependencies
1:44:20 PM: Starting to download cache of 7.5KB
1:44:21 PM: Finished downloading cache in 29.8533ms
1:44:21 PM: Starting to extract cache
1:44:21 PM: Finished extracting cache in 3.122679ms
1:44:21 PM: Finished fetching cache in 79.008936ms
1:44:21 PM: Starting to prepare the repo for build
1:44:21 PM: Preparing Git Reference refs/heads/main
1:44:21 PM: Parsing package.json dependencies
1:44:22 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: '' versus 'app' in the Netlify UI
1:44:23 PM: No build steps found, continuing to publishing
1:44:23 PM: Creating deploy upload records
1:44:23 PM: Failing build: Failed to build site
1:44:23 PM: Failed during stage 'building site': Deploy directory 'out' does not exist
1:44:23 PM: Finished processing build request in 2.654128943s

I assume that I no longer need a netlify.toml since I am setting the base and publish folders in the site settings.

Hi @jordan1

Any setting in a netlify.toml file will override the accompanying setting value set via the UI.


Hey there, @jordan1 :wave:

Thanks for reaching out! Let us know if you have any lingering questions after @coelmay’s response. We are happy to help any way we can :slight_smile: