-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Cycle 4 Release #67
base: main
Are you sure you want to change the base?
Conversation
The example code snippet getSiteVersion has a lot going on. Does Mintlify support highlighting certain areas of the code? |
@migueloller for |
I think showing it at the top-level that way might be a bit misleading given that it can only be used on RSCs or Route Handlers. What if we did this?
import { Page } from '@makeswift/runtime/next'
import { client } from '@/lib/makeswift'
export default function Page() {
const snapshot = await client.getPageSnapshot('/', {
siteVersion: siteVersion(),
})
if (snapshot == null) notFound()
return <Page snapshot={snapshot} />
} Is that too busy? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started adding suggestions where I found usage of getSiteVersion
but there were enough where it made sense to stop and let you take care of it. Also, we'll want to update other instances of that like the URL get-site-version
, etc.
I'm silly. The API is indeed getSiteVersion. I was thinking too much about the cookies and headers APIs from Next.js and what we wanted to name our function longterm that I thought we had named it siteVersion...
@migueloller were you originally thinking it should be For the code snippet on |
Yeah, the API should probably be |
…d getComponentSnapshot docs
…and getPageSnapshot
…references to distinguish them
3e90482
to
7c05747
Compare
…tail product details pages use case
getComponentSnapshot
doc<Slot>
<MakeswiftComponent>
docFunctions
sectionDeploying
sectionLocalization
section toGuides
sectionApp Router
andPages Router
for bothInstallation
andLocalization
under a groupgetSiteVersion
doc underFunctions
section in sidebar