{"action":"created","issue":{"url":"https://api.github.com/repos/hexojs/hexo/issues/835","labels_url":"https://api.github.com/repos/hexojs/hexo/issues/835/labels{/name}","comments_url":"https://api.github.com/repos/hexojs/hexo/issues/835/comments","events_url":"https://api.github.com/repos/hexojs/hexo/issues/835/events","html_url":"https://github.com/hexojs/hexo/issues/835","id":42286033,"number":835,"title":"Best way to get most popular posts or most comments posts?","user":{"login":"andrewboni","id":255026,"avatar_url":"https://avatars.githubusercontent.com/u/255026?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewboni","html_url":"https://github.com/andrewboni","followers_url":"https://api.github.com/users/andrewboni/followers","following_url":"https://api.github.com/users/andrewboni/following{/other_user}","gists_url":"https://api.github.com/users/andrewboni/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewboni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewboni/subscriptions","organizations_url":"https://api.github.com/users/andrewboni/orgs","repos_url":"https://api.github.com/users/andrewboni/repos","events_url":"https://api.github.com/users/andrewboni/events{/privacy}","received_events_url":"https://api.github.com/users/andrewboni/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-09-09T09:16:34Z","updated_at":"2015-07-17T08:24:13Z","closed_at":"2015-07-17T08:24:13Z","body":"I'm wondering what the best way to get a list of, say, the 10 most popular posts, either by views or by comments, so that I can add a small sidebar widget. I know that since this is static, it's a little tricky, but has anyone done this?\r\n\r\nDisqus outlines [a way to get comments for a post](https://help.disqus.com/customer/portal/articles/1131783-tutorial-get-comment-counts-with-the-api), but it doesn't seem ideal for a blog with hundreds of posts.\r\n\r\nIs there a better way? Bonus points if it's all client side JS as opposed to generating it during a `hexo generate`. Thanks!"},"comment":{"url":"https://api.github.com/repos/hexojs/hexo/issues/comments/122214024","html_url":"https://github.com/hexojs/hexo/issues/835#issuecomment-122214024","issue_url":"https://api.github.com/repos/hexojs/hexo/issues/835","id":122214024,"user":{"login":"leesei","id":544400,"avatar_url":"https://avatars.githubusercontent.com/u/544400?v=3","gravatar_id":"","url":"https://api.github.com/users/leesei","html_url":"https://github.com/leesei","followers_url":"https://api.github.com/users/leesei/followers","following_url":"https://api.github.com/users/leesei/following{/other_user}","gists_url":"https://api.github.com/users/leesei/gists{/gist_id}","starred_url":"https://api.github.com/users/leesei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leesei/subscriptions","organizations_url":"https://api.github.com/users/leesei/orgs","repos_url":"https://api.github.com/users/leesei/repos","events_url":"https://api.github.com/users/leesei/events{/privacy}","received_events_url":"https://api.github.com/users/leesei/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T08:24:13Z","updated_at":"2015-07-17T08:24:13Z","body":"Hexo, as a static site generator, does not track those measures.\r\nThey could be implemented by plugin and themes though."}}