-
Notifications
You must be signed in to change notification settings - Fork 46
Nextra v4 upgrade #439
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
Nextra v4 upgrade #439
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
977f297 to
89b1f05
Compare
89b1f05 to
47c4992
Compare
47c4992 to
26e5f0c
Compare
26e5f0c to
e854796
Compare
a0cb010 to
8d36b5c
Compare
8d36b5c to
87d2e95
Compare
87d2e95 to
ac901d5
Compare
e72fb9c to
4bd15cb
Compare
4bd15cb to
180c402
Compare
180c402 to
5971084
Compare
5971084 to
34abecd
Compare
tstirrat15
left a comment
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.
See comments
| @@ -1,15 +1,15 @@ | |||
| import type { MetaRecord } from "nextra"; | |||
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.
Nextra fails cryptically when you have a _meta.ts file with the wrong shape. Adding this type assertion helps prevent that.
| "grpc-api": { | ||
| title: "gRPC API Reference", | ||
| href: "https://buf.build/authzed/api/docs/main:authzed.api.v1", | ||
| newWindow: true, |
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.
Nextra automatically opens external links in new tabs now.
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.
This file was just moved.
| @@ -1,4 +1,4 @@ | |||
| import YouTube from "react-youtube"; | |||
| import YouTube from "@/components/youtube-wrapper"; | |||
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.
We needed to wrap this component because it's an old-style class component and next doesn't like them in server components, which is what these mdx files turn into.
| - [spicedb datastore](#reference-spicedb-datastore) - datastore operations | ||
| - [spicedb lsp](#reference-spicedb-lsp) - serve language server protocol | ||
| - [spicedb man](#reference-spicedb-man) - Generate man page |
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.
These changes are from running prettier - they should be noops.
| // using the metadataBase field. | ||
| canonical: "./", |
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.
Thanks, next. 🪄
| process.env.NEXT_PUBLIC_ENABLE_SEARCH_BLOG_INTEGRATION === "true"; | ||
|
|
||
| const navbar = ( | ||
| <Navbar |
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.
There's a bunch of components that we were reimplementing that we can now pull directly from Nextra. Navbar and Footer are examples.
| color={{ | ||
| hue: { dark: 45, light: 290 }, | ||
| saturation: { dark: 100, light: 100 }, | ||
| }} |
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.
This is where the color part of the old themeconfig went.
| <Banner dismissible={false}> | ||
| <BannerContents /> | ||
| </Banner> |
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.
This is where the banner part of the old themeconfig went.
| <OurLayout> | ||
| <SpeedInsights /> | ||
| <Providers>{children}</Providers> | ||
| </OurLayout> |
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.
This is where the old app.tsx bits went.
Description
Maintenance, mostly. We were on v2, which is more than a year old; we moved to v3 but that broke some things, especially around search. This brings us onto v4.
Changes
Will annotate. It was an annoyingly large set of changes.
Testing
Review. See that the deployment looks good.