Demoing page flicker with `gatsby-plugin-image` using `StaticImage` & `gatsby-plugin-intl` as locale is pushed onto route.
Site is here.
Go try it out and propose a better strategy for pushing locales onto routes, please.
To prevent network requests as gatsby-plugin-intl
pushes the locale path onto the route, use the version of Link
it comes bundled with.
Pushing the locale onto the route forces a network request, which defeats the purpose of using Gatsby in the first place. The fix is to use the version of Link
that gatsby-plugin-intl
comes bundled with.
Before, using Gatsby Link
:
After, using gatsby-plugin-intl
bundled Link
:
This is unrelated to the locale routes issue but included anyway. Watch the logo png in the Header. Open to ideas for how to fix this.
Here's /src/components/Logo.js
:
export function Logo() {
return (
<StaticImage
src="../assets/images/logo.png"
loading="eager"
alt="Logo"
placeholder="blurred" />
);
}
How to work this.
git clone
this repo
npm install
npm start
There's some Tailwind and SSR stuff for themes you can ignore.
โโโ LICENSE
โโโ README.md
โโโ gatsby-browser.js
โโโ gatsby-config.js
โโโ gatsby-ssr.js
โโโ node_modules
โโโ package-lock.json
โโโ package.json
โโโ postcss.config.js
โโโ public
โโโ src
โโโ static
โโโ tailwind.config.js