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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

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
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.

3 participants