#is it possible to do SSG with page searchParam for pagination?

1 messages · Page 1 of 1 (latest)

rancid hull
#

Hi, I have a /blog page on my website that includes a page searchParam for pagination. Since I can calculate the total number of pages, I thought, 'Great! I'll use SSG.' But if I understand correctly, SSG only works with path parameters instead of query parameters, right? If so, is it considered best practice for SEO to replace /blog?page=2 with /blog/2?

slim voidBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

fallow zealot
#

Yes, I would use blog/[slug]/page.tsx, and then you can use generateStaticParams to pre-render

latent whale
#

Actually, seo works with query params, it's a new thing i discovered on my portfolio @rancid hull

#

Basically my portfolio uses query params to show designs for specific projects

#

Notice the value=vibeify

#

It will open that directly

#

Try it out

#

But yes idk how to recreate it, so usually I would recommend path params.. but if you want to use search params google might index those sometimes

latent whale
#

Also no you can't ssg search params

rancid hull
#

thanks guys, i'll use /blog/pages/[page]/page.tsx

latent whale
latent whale
slim voidBOT
wispy fossil
#

personally i'd still use search params and use unstable_cache to cache it so it's effectively static