alexbruno / hexo-generator-json-content

Hexo (https://hexo.io/) plugin to generate a JSON file for generic use or consumption with the contents of posts and pages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limit total number of posts in json file

nkrusch opened this issue · comments

commented

Feature Request

In the jsonContent settings allow specifying an integer limit n for posts and only include n posts in the output.

My use case is the following: I have a react app and a Hexo blog. I use this package to create a json file that I then use in the react app to display the "most recent" articles. I don't need a complete list of all posts, only recent ones. Currently, as the number of posts grows the json file size continues to grow as well and slows loading the app.

Hello, good idea!
I will make it ASAP.

commented

@alexbruno Any chance this is something you can still work on? I'm looking forward to this as well!