T3-stack SSG
Hey guys, im creating a site with the
pages
router. Im wondering if its possible to create most of it with SSG? Since most of the pages only needs to be populated with data at build time.
What do I do ? I use getStaticProps()
and getStaticPaths()
etc? And it will automatically SSG them at build time?4 Replies
Also the site is gonna use around 25k images. how should i host them? just have them in
/public/static/
folder or are there any better solutions for this ?IIRC SSG was covered in that 3hr tutorial Theo did, timestamp: https://youtu.be/YkOSUVzOAA4?si=uiG4CNEGzAoYaBVh&t=7560
Not sure if this is outdated info but hope it helps
Theo - t3․gg
YouTube
T3 Stack Tutorial - FROM 0 TO PROD FOR $0 (Next.js, tRPC, TypeScrip...
I've never worked this hard on a video before. I really hope y'all can benefit from this 🙏
GITHUB REPO https://github.com/t3dotgg/chirp
DEPLOYED APP https://xn--uo8h.t3.gg/
GET A JACKET IF YOU'RE COOL LIKE THAT https://shop.t3.gg/
ALL MY VIDEOS ARE POSTED EARLY ON PATREON https://www.patreon.com/t3dotgg
Everything else (Twitch, Twitter, Discor...
thanks i check it out!
I ended up using the createServerSideHelper for generating static pages with the pages folder.
Trying to get static and tRPC to work with 13 and the appDir right now and it's messy, not recommended. : <
My getStaticProps:
Might wanna make the helper resuable ofc