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
Don't load all news posts at once, but automatically load more the more you scroll down the page.
Benefit: As the number of news posts grow, if we want to not have to worry about the news page growing in kilobytes, we won't have to delete old news post.
Overview of how to add:
Write an API route on the server that will send the response with ~5 news posts after a date provided in the request.
Compile a small/compact script that the client-side can use that will convert markdown to html. Right now we have an npm package that can do that server-side, but I'm sure we can find a script off the internet in which we can grab to enable client-side as well!
OR- an alternative option: Convert the news post markdown to html before we serve them to the client! We could do this either at the time of the request, or during build so that they are all pre-converted into html (that's probably more efficient)
The choice of route will come down to how large the markdown-to-html converter script IS, IF we are able to find one for the client, and compare that to the extra size introduced by sending them html instead of a smaller markdown file.
Write a script for the news page that, when we scroll to the bottom of the page, will fetch that API request we created to retrieve more news posts, and use the above markdown-to-html converter to append them to the document!
Copy and paste the spinny pawn animation at the bottom of the page while the API request is in progress.
The text was updated successfully, but these errors were encountered:
Don't load all news posts at once, but automatically load more the more you scroll down the page.
Benefit: As the number of news posts grow, if we want to not have to worry about the news page growing in kilobytes, we won't have to delete old news post.
Overview of how to add:
Write an API route on the server that will send the response with ~5 news posts after a date provided in the request.
Compile a small/compact script that the client-side can use that will convert markdown to html. Right now we have an npm package that can do that server-side, but I'm sure we can find a script off the internet in which we can grab to enable client-side as well!
OR- an alternative option: Convert the news post markdown to html before we serve them to the client! We could do this either at the time of the request, or during build so that they are all pre-converted into html (that's probably more efficient)
The choice of route will come down to how large the markdown-to-html converter script IS, IF we are able to find one for the client, and compare that to the extra size introduced by sending them html instead of a smaller markdown file.
Write a script for the news page that, when we scroll to the bottom of the page, will fetch that API request we created to retrieve more news posts, and use the above markdown-to-html converter to append them to the document!
Copy and paste the spinny pawn animation at the bottom of the page while the API request is in progress.
The text was updated successfully, but these errors were encountered: