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

docs: deprecate config.external_link (boolean) & config.use_date_for_updated #4371

Merged
merged 2 commits into from Jun 23, 2020

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Jun 23, 2020

What does it do?

Deprecate old options, to be dropped in the next major release (Hexo 6), not a breaking change for Hexo 5. Retain backward compatibility only for one major version.

Initially I planned to drop config.external_link: true so that new option is used,

external_link:
  enable: true

but I noticed the release note didn't mention about deprecation, so the old option is retained for now.

How to test

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

Screenshots

Pull request tasks

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

@curbengh curbengh added this to the 5.0.0 milestone Jun 23, 2020
@curbengh curbengh added this to In progress in 5.0.0 via automation Jun 23, 2020
@curbengh curbengh requested a review from a team June 23, 2020 05:31
5.0.0 automation moved this from In progress to Reviewer approved Jun 23, 2020
@@ -11,6 +11,7 @@ function externalLinkFilter(data) {

if (typeof EXTERNAL_LINK_POST_CONFIG === 'undefined') {
if (typeof config.external_link === 'undefined' || typeof config.external_link === 'object'
// Deprecated: config.external_link boolean option will be removed in future
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact we could remove the boolean value support in Hexo 5.0.0, as it was introduced in Hexo 4.0.0.

@SukkaW SukkaW merged commit 657a037 into hexojs:master Jun 23, 2020
5.0.0 automation moved this from Reviewer approved to Done Jun 23, 2020
curbengh pushed a commit to curbengh/curbengh.github.io that referenced this pull request Jul 12, 2020
@SukkaW SukkaW mentioned this pull request Jul 16, 2020
22 tasks
@curbengh curbengh deleted the drop-old-external_link branch July 24, 2020 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
5.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants