Giter Site home page Giter Site logo

Comments (1)

baobabKoodaa avatar baobabKoodaa commented on June 25, 2024

Hi @MohammedMaaz ! I'm glad to hear you like the starter. I understand that you want to use dynamic content instead of static content, and you want the website to be easily crawlable for web crawlers for SEO purposes.

if my content is dynamic and I want to give features to my users such as filter and sort content (products) based on different criterias and sort fields that too while lazily loading (only the content that is reqd. on the client) from the server.

The way that the starter is set up, we have a "fake API" where the frontend makes request at runtime. For example, when the user scrolls down, the frontend might send a request "please give me items for page 8". Normally you would have a backend server providing an API to respond to these requests. However, since this is a static site generator, we don't have a backend, we have simply pregenerated all the responses at build time, as you suspected. So all the responses are simply static JSON files.

If you were to switch from static content to dynamic content, you wouldn't have these pregenerated responses, you would instead have a backend server somewhere providing this API. If you have a real API already for your real use case, it should be fairly straightforward to modify this starter to fetch items from the real API instead of the fake API. If you want filtering and sorting to be done on server side, then you would have to implement these features on your backend. All of this sounds like reasonable to me.

Since it really lazily loads content from the server (not a mere client side filtering), what levels of SEO support does it provide for content that lazily loads on scrolling and is not present initially.

Right now the starter provides a paginated alternative to infinite scrolling. These paginated pages are easily crawlable (SEO support). However, if you were to change from static content to dynamic content, you wouldn't be able to generate these paginated pages. This would be an issue for your SEO.

I have not personally worked on SEO, so I'm not the best person to answer how to make a site with dynamic content easily crawlable. But this sounds like a very generic problem that many people have faced, so you will probably find a lot of resources online about ways to resolve the issue. Let me know what you find :)

from gatsby-starter-infinite-scroll.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.