Base dir set as docs, still checking root

Hey all,

I have a repo with this file structure:

These are two sites. One is example.com and the other docs.example.com, the latter has the base directory set to docs. Though for some reason, the docs site still uses the netlify.toml that’s in the root of the repo. Can this be disabled/circumvented somehow?

edit: setting a custom build ignore per site would be a solution too, not sure if that’s possible though

Hey @lieuwe-berg,
Are you still running into this? And am I understanding that this is what you want:

  • for the main site, ignore changes to the docs/ directory and publish public/
  • for the docs site, publish docs/

Just wanna confirm before advising further!

Yes, this is still a minor inconvenience.

The main site should ignore changes to the docs/ directory and publish build/ (it’s a react app). This all currently works fine. It uses this ignore command:
ignore = "git diff --quiet HEAD^ HEAD src/ public/ package.json netlify.toml" (basically any files I may change, it continues only if src, public… are changed).

The docs site should publish docs/ and ignore changes to the other files.

I noticed in the netlify deploy settings that base directory was not set, but publish directory was docs/. I went ahead and changed the base directory to docs and cleared publish, however now it just serves the repo instead (e.g. docs.example.com/docs would give the docs page, .com/public would give the html for the main site).

I assume this is not intended behavior?

Update: I appended a . after the publish directory, so it would display docs/. instead of “Not set” (which it’d default to if you only set the base directory). This seemed to fix it for me, it’s now publishing from docs/.

However, the original issue still persists. The docs site is picking up the netlify.toml from the root of the repo, and not looking for one in the base directory I set.

In most cases, netlify.toml settings will override any/all other settings. Please consider this when adding settings to that file.

The netlify.toml in the base directory doesn’t currently set a base directory or publish directory.

In the publish directory itself (the subdirectory docs), there is no netlify.toml for the build system to read (as the screenshot above shows).

If there are other questions, please let us know.