-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
refactor: deprecate config.external_link as boolean #4376
refactor: deprecate config.external_link as boolean #4376
Conversation
if (typeof config.external_link === 'boolean') { | ||
throw new TypeError('config.external_link no longer supports Boolean value, changelog: https://github.com/hexojs/hexo/releases/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would better to retain support for now but display a warning, so that the breaking change is not so sudden.
Since it will deprecated in v5, it's clearer to link directly to https://github.com/hexojs/hexo/releases/tag/5.0.0
Usage of config.use_date_for_updated
should also display warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already deprecate it in Hexo 4.0.0. So it is fine when we remove it in Hexo 5.0.0.
I will open another PR to add a warning for use_date_for_updated
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already deprecate it in Hexo 4.0.0.
That was the initial intention, however we forgot to mention it in the v4 release note. Can we soft-deprecate it this time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@curbengh IMHO we could bring up a config validation.
6745f75
to
8ad6cf0
Compare
What does it do?
config.external_link
with boolean value is deprecated since Hexo 4.0.0. It is now removed.How to test
Screenshots
Pull request tasks