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(theme): deep merge configs #3967

Merged
merged 2 commits into from Dec 16, 2019
Merged

Conversation

@curbengh
Copy link
Contributor

curbengh commented Dec 15, 2019

What does it do?

Fixes #3964

How to test

cc @cmpute

# themes/xxx/_config.yml
a:
  c: 2
# _config.yml
theme_config:
  a:
    b: 3
package.json
-  "hexo": "^4.1.1",
+  "hexo": "curbengh/hexo#deepmerge_theme_config"
  1. rm package-lock.json && rm -rf node_modules/
  2. npm install
  3. hexo clean && hexo server (or hexo generate if relevant)
  4. Verify theme.a should have { b: 3, c: 2}

Maintainers:

git clone -b deepmerge_theme_config https://github.com/curbengh/hexo.git
cd hexo
npm install
npm test

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.
@coveralls

This comment has been minimized.

Copy link

coveralls commented Dec 15, 2019

Coverage Status

Coverage decreased (-0.006%) to 97.133% when pulling 9b401fd on curbengh:deepmerge_theme_config into 2c50d3b on hexojs:master.

@cmpute

This comment has been minimized.

Copy link

cmpute commented Dec 15, 2019

Thanks!

@SukkaW
SukkaW approved these changes Dec 15, 2019
Copy link
Member

SukkaW left a comment

LGTM!

@curbengh

This comment has been minimized.

Copy link
Contributor Author

curbengh commented Dec 16, 2019

Verified in a test blog.

@curbengh curbengh merged commit 457fcfc into hexojs:master Dec 16, 2019
3 of 4 checks passed
3 of 4 checks passed
coverage/coveralls Coverage decreased (-0.006%) to 97.133%
Details
Travis CI - Pull Request Build Passed
Details
codeclimate All good!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@curbengh curbengh deleted the curbengh:deepmerge_theme_config branch Dec 16, 2019
@stevenjoezhang stevenjoezhang mentioned this pull request Dec 17, 2019
5 of 11 tasks complete
stevenjoezhang referenced this pull request in theme-next/hexo-theme-next Dec 18, 2019
@stevenjoezhang stevenjoezhang mentioned this pull request Dec 18, 2019
5 of 11 tasks complete
@SukkaW SukkaW mentioned this pull request Dec 21, 2019
1 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.