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

feat: bind hexo context to helper function callback #5555

Merged
merged 8 commits into from
Dec 11, 2024

Conversation

dimaslanjaka
Copy link
Contributor

@dimaslanjaka dimaslanjaka commented Oct 5, 2024

What does it do?

  • Apply hexo context for this callback, useful for plugin written with typescript. Sample
  • Fix some missmatch type (fail compile fixed)

Screenshots

image
image

based on https://hexo.io/api/helper#How-do-I-use-another-registered-helper-in-my-custom-helper
image

Pull request tasks

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

Copy link

github-actions bot commented Oct 5, 2024

How to test

git clone -b fix-helper-context https://github.com/dimaslanjaka/hexo.git
cd hexo
npm install
npm test

@dimaslanjaka
Copy link
Contributor Author

dimaslanjaka commented Oct 5, 2024

@uiolee @SukkaW review pls, any miss/wrong ?

lib/plugins/filter/template_locals/i18n.ts Outdated Show resolved Hide resolved
@SukkaW SukkaW requested a review from a team December 10, 2024 15:29
Copy link
Member

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

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

LGTM.

@hexojs/core What do you think?

Copy link
Member

@renbaoshuo renbaoshuo left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@SukkaW SukkaW merged commit ebe92ba into hexojs:master Dec 11, 2024
20 of 22 checks passed
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.

4 participants