Deprecate theme attribute in site config JSON#2235
Conversation
yucheng11122017
left a comment
There was a problem hiding this comment.
LGTM! Thank you @itsyme
theme attribute in site config JSON|
Thanks for the PR @itsyme! LGTM 👍 Are there no tests that need to be updated for this? |
I was worried about that as well, but I searched through all instances of Though I found something else in |
packages/core/src/Site/index.js
Outdated
| */ | ||
| copyBootstrapTheme(isRebuild) { | ||
| const { theme } = this.siteConfig; | ||
| const theme = this.siteConfig.style.bootstrapTheme; |
There was a problem hiding this comment.
Wondering if we should rename the theme to bootstrapTheme?
There was a problem hiding this comment.
I think we should rename it. Makes more sense since the function is called copyBootstrapTheme.
raysonkoh
left a comment
There was a problem hiding this comment.
LGTM other than the minor naming issue.
What is the purpose of this pull request?
Overview of changes:
Resolves #2232. Fully deprecates
themeattribute in site config JSON.themeattribute in site config JSON has been fully deprecated.To migrate:
Use
"style": {"bootstrapTheme": "..."}instead of"theme": "...".For example,
Original (in site.json):
Updated (in site.json):
Anything you'd like to highlight/discuss:
Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Deprecate theme attribute in site config JSON
Theme attribute in site config JSON is supported, though not
documented.
This could be confusing for users when trying to search for the
theme attribute in documentation or when referring to older
MarkBind sites which still use the theme attribute.
Let's deprecate the theme attribute in site config JSON fully so that
all MarkBind sites use style.bootstrapTheme, which is documented.
This prevents confusion for users by standardising the use of
style.bootstrapTheme to set the bootstrap theme.
Checklist: ☑️