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

How to iterate over all Posts in the post_permalink stage #5583

Open
2 tasks done
yqs112358 opened this issue Dec 9, 2024 · 0 comments
Open
2 tasks done

How to iterate over all Posts in the post_permalink stage #5583

yqs112358 opened this issue Dec 9, 2024 · 0 comments

Comments

@yqs112358
Copy link

yqs112358 commented Dec 9, 2024

Check List

  • I have already read Docs page.
  • I have already searched existing issues.

Feature Request

I'm writing a hexo filter plugin, which need to iterate over the front-matter of all Posts in the post_permalink stage, thus to count for a particular data.

However, calling hexo.locals.get('posts').toArray() directly in the post_permalink callback will return an empty list. Is there any alternative solution to traversing Posts in the post_permalink stage?

Others

No response

@yqs112358 yqs112358 changed the title 如何在post_permalink阶段遍历所有Posts How to iterate over all Posts in the post_permalink stage Dec 9, 2024
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

No branches or pull requests

1 participant