Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the config should load from source/_data too. #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snowyu
Copy link
Contributor

@snowyu snowyu commented Dec 10, 2019

No description provided.

@jiangtj
Copy link
Member

jiangtj commented Jan 4, 2020

This feature needs to be discussed @theme-next/next

First, NexT already supports reading the configuration under next.yml, for example:

├── source
│   └── _data
│       ├── next.yml

next.yml

foo:
  enable: true
  ...
bar:
  enable: false

And this PR will additionally get the configuration from other yml file (named by key)

├── source
│   └── _data
│       ├── foo.yml
│       └── bar.yml

foo.yml

enable: true
...

When there are many configurations in one key, splitting them into different files may be a good choice, but almost all in NexT are not long.

So in most cases, it is not used, and it will even make a lot of files under _data.

@snowyu
Copy link
Contributor Author

snowyu commented Jan 7, 2020

This would be more nice for plugin development and avoid to put the plugin config into the main config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants