How to present excerpt topics?
-
Hello everyone, I am using NodeBB to build a Facebook-like social media platform, displayed in a newsfeed format. The interface will be custom-coded and will call NodeBB's API for display. Currently, I notice that the topic API doesn't seem to have a content preview section, or maybe I haven't found it yet. Could you please assist me in figuring out how to display it?
Tks -
Im curious about this and would be very interested to see your progress. People in the past have posted that they would build a custom front end using NodeBB API but those threads went dead.
I had a trial at building a front end in pure JS, (no CSS) and I got basic functionality. Could see see it was going to be a lot of work to complete.
But keep us updated, especially if you get a working demo site!
With regard to your specific question, what do you want in your preview? Of course your code could pull all recent posts and you could extract what you wish to display? -
@Hưng-Đỗ-Tiến for content preview, you could use the API to pull the complete post and use
line-clamp
in CSS to truncate it to the length you desire.