hexo-generator-json-content icon indicating copy to clipboard operation
hexo-generator-json-content copied to clipboard

Limit total number of posts in json file

Open nkrusch opened this issue 4 years ago • 2 comments

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.

nkrusch avatar Apr 01 '20 22:04 nkrusch

Hello, good idea! I will make it ASAP.

alexbruno avatar Apr 14 '20 19:04 alexbruno

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

svengeance avatar Sep 11 '20 06:09 svengeance