You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I received the same error, but the above change didn't fix it for me. After poking around in the code for a bit, it looks like site.posts isn't an array, but some other type of object. It has a property named data that contains the array of posts. In order to fix the error, I changed line 24 to to this:
if (config.limit) posts = posts.data.splice(0, config.limit);
With this change, the error disappeared and I was able to verify that the JSON Feed file was successfully generated.
_config.yml
hexo server
, it will raise errorwhat caused error is in
index.js
line24
if (config.limit) posts = posts.splice(0, config.limit);
can be fixed by changing into this
if (config.limit) posts = posts.limit(config.limit);
run
hexo server
, now it's OKCheers :)
The text was updated successfully, but these errors were encountered: