DEV Community

Discussion on: Creating a Feed for a Git-based CMS with Nuxt

Collapse
 
kp profile image
KP

@jeremywynn Thank you, this is super helpful and good to know since it sounds like you've done it before. Alex Lichter on the nuxt channel told me that the feed module could be used for dynamic SSR, but that didn't sound right to me, and no matter what I tried, I couldnt get it to work.
I previously did have the infinite loading working but not in SSR mode (I was not using the IntersectionObserver, so viewing the source of the page showed NOTHING - yes, terrible for SEO).

What you described (IntersectionObserver) is exactly the path I am on right now...it was recommended by a person on Discord....but I have not managed to get it to work and would really appreciate your eyes on this. Mind if I send you a link to a github repo or Code Sandbox?

Thanks in advance for your input!

Thread Thread
 
jeremywynn profile image
Jeremy Wynn

Sure, but no promises. I remember having to do things differently going from SPA to Universal mode, such as :key not working. But then I switched back to SPA since it was really what I was building.

Thread Thread
 
kp profile image
KP

@jeremywynn thank you.
To boil it down I am trying to do a page that has infinite scroll / loading, but in SSR mode (possibly with AsyncData). If you see how dev.to/ does it....on the homepage if you scroll down, new content is shown. If you then view source, all the new content shows up in the source. That's exactly what I need to do for SEO and have only got infinite loading working (I trigger the ajax from the store, but then the new content doesnt show up on viewing the source).

I have a codesandbox link here...it's kind of broken though. Been working on this for the past 2 weeks
codesandbox.io/s/codesandbox-nuxt-...
(this is my attempt at doing it in SSR mode with Intersection Observor, but it doesnt work. I do have infinite loading working in non-SSR mode, but I need it to work in SSR mode for SEO)

Let me know if you need any updates to the CodeSandBox link above or if anything isn't clear. Thanks for looking at this.