Add Last X Content Type Under Links
patdavid opened this issue · comments
On the main page, there are three primary links for the three biggest types of content on the site:
- Articles
- Blog
- Discuss
Including the short text under each link, I thought it would be nice to include the X last titles of those content as well. Here's an example of what the Discuss feed might look like:
Looks good. It shows people a sample of what they can find there without having to click.
Would you move the latest articles and blog posts to a similar position?
@paperdigits yes, I was thinking the latest blog+article posts as well (though those are things that can be added during build-time obviously - the discuss feed will need to parse a little json with js enabled).
We'd need to parse https://discuss.pixls.us/latest.json right?
@paperdigits Yep! I think there may even be a way to limit the response to be even smaller? (I haven't checked on that in a while, so I could be mistaken).
I haven't been able to find one either - have we checked how big the json response is? Maybe it's not too bad?
Seems to be the last 30 posts in the json response.
I'm going to slowly work my way through this, as my javascript is horrible.
$.ajax("https://discuss.pixls.us/latest.json").then(function (result) {
var topics = result.topic_list.topics;
for (var t = 0; t < topics.length; t++) {
console.log(topics[t].title);
}
});
Where'd the jquery come from?