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

Allow theme config to be overridden by site config #757

Merged
merged 1 commit into from
Jul 30, 2014

Conversation

jaredly
Copy link
Contributor

@jaredly jaredly commented Jul 30, 2014

If there is a theme_config object in the main site config, it is merged into
the theme's config.

Ex:

# _config.yml
theme_config:
  bio: "My awesome bio"
# themes/my-theme/_config.yml
bio: "Some generic bio"
logo: "a-cool-image.png"

results in the following theme config

{
  bio: "My awesome bio",
  logo: "a-cool-image.png"
}

If there is a `theme_config` object in the main site config, it is merged into
the theme's config.

Ex:
```yml
\# _config.yml
theme_config:
  bio: "My awesome bio"
```

```yml
\# themes/my-theme/_config.yml
bio: "Some generic bio"
logo: "a-cool-image.png"
```

results in the following theme config
```js
{
  bio: "My awesome bio",
  logo: "a-cool-image.png"
}
```
tommy351 added a commit that referenced this pull request Jul 30, 2014
Allow theme config to be overridden by site config
@tommy351 tommy351 merged commit 1b7490f into hexojs:master Jul 30, 2014
NoahDragon pushed a commit to hexojs/site that referenced this pull request Jan 18, 2018
The 'theme_config' setting, for configuring themes in the primary _config.yml file is extremely useful.
It doesn't appear in the documentation, so this commit adds it.

The example code is taken directly from the original pull request: hexojs/hexo#757
stevenjoezhang referenced this pull request in theme-next/hexo-theme-next Dec 18, 2019
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