These are chat archives for jescalan/roots

18th
Feb 2017
Jeff Escalante
@jescalan
Feb 18 2017 20:17
ooh interesting
i guess that makes sense
yeah so i think at this point, maybe running this as hybrid static might be most efficient
you can grab the first 10 blog posts for the index page and render those
then use client-templates to get your post template in the front end
and when the user hits the next page, fetch the next 10 and render them into the template
know what i mean here?
andrewgrano
@andrewgrano
Feb 18 2017 20:43
yes, I know exactly what you mean! However, I believe I would run into the same issue if the user clicked "next" enough times to reveal more than 100 posts. Also, I would not be able to list all posts that belong to a specific category. ( such as this page : https://www.roaminglove.com/places/europe )
Jeff Escalante
@jescalan
Feb 18 2017 20:43
so once you are on the client side, you can change the request params as needed
so you can just request the next 10 when the client clicks next
same with categories, when a category page is hit, make the request and render into the template
its basically converting it into a single page app
the bad part is that it's not going to render quite as fast as a cached full static page, but the good part is that you don't need to compile hundreds of posts every time you make a small change to the site in development
for large blogs, there is a limit to how far you can go with full static
once you are looking at hundreds of posts, its usually time to think about converting to a SPA
the only way around this would be between-build cacheing, which we worked on briefly with spike but haven't been able to flawlessly implement yet
and neither has any other SSG
andrewgrano
@andrewgrano
Feb 18 2017 20:54
Very interesting! Thank you VERY MUCH for your knowledge and advice. I understand that all SSG have limitations. Do you think that converting my existing roots site into a "pho-SPA" as you have described would be worth the time/effort? Or would it be smarter to just utilize an existing SPA framework?
Jeff Escalante
@jescalan
Feb 18 2017 22:43
i'd use an existing framework for sure
but you can use that along with roots
roots doesnt do client side stuff, it just compiles your files
so the two don't conflict at all