Skip to content

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

@yqs112358

Description

@yqs112358

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions