DEV Community


Discussion on: The best way to load and use Google Fonts in Next.js + Tailwind

marcvangend profile image

Thanks for sharing. AFAIK, these is no pages/_document file by default, you have to create it yourself to override the default behavior.
But I'm wondering: is it really necessary here to start using a customized _document? You could also use next/head in pages/_app to add the code snippet to the head.

thomasledoux1 profile image
Thomas Ledoux Author

Hey Marc,

I haven't tested this with pages/_app yet, but I assume it would work too since you would inject the code into the

section with next/head on every page.
pabloverduzco profile image
Pablo Verduzco

I think it is totally allowed.

Check this out: