hasura / gatsby-gitbook-starter

Generate GitBook style modern docs/tutorial websites using Gatsby + MDX
https://hasura.io/learn/graphql/react/introduction/
MIT License
981 stars 382 forks source link

All the MD files are preloaded on site load #109

Open xbaha opened 3 years ago

xbaha commented 3 years ago

This works if the site is small, but if I want to have long texts or even books, this is not going to be smooth.

is there any way to load the MD files only when I click on them?

thank you.

praveenweb commented 2 years ago

@xbaha - This happens due to the way Gatsby pre-loading same domain links on the page that use the <Link> tag. One way to avoid this would be to make them <a href> but you will lose the benefits of a Single Page Application. The other approach would be to disable Javascript with a gatsby-plugin (unless you are using any specific MDX features).