alberto56
alberto56

Reputation: 3182

In Netlify CMS's config.yml, how to specify that the site is in a subdirectory of the repo?

I have a repo at github.com/some_user/some_repo, and it's set to deploy via GitHub pages on the ./docs subfolder of the master branch, to example.com.

./docs/admin/config.yml (and example.com/admin/config.yml) has the following code:

backend:
  name: github
  repo: some_user/some_repo
  branch: master
  base_url: https://my-authentication-server.example.com

How do I tell netlify CMS that the code is in the ./docs subfolder and not the root of the codebase? Is there something like this?

backend:
  ...
  site_directory: docs
  ...

Upvotes: 0

Views: 214

Answers (1)

alberto56
alberto56

Reputation: 3182

As far as I can tell there is no such directive, however, each individual file or folder should be set to reside in the subdirectory, for example:

...
folder: docs/_posts/
...
file: docs/_data/my_custom_data.yml
...

etc. Then it works.

Upvotes: 0

Related Questions