Skip to content

Commit bc2a4ac

Browse files
authored
Upgrade nextra (#226)
* Upgrade deps except react * Tweak config * Apply prettier * Fix metafiles * Make css compatible with theme * Fix components imports and usage
1 parent 637dce4 commit bc2a4ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2622
-2520
lines changed

next.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import nextra from "nextra";
22

33
const withNextra = nextra({
44
theme: "nextra-theme-docs",
5-
themeConfig: "./src/theme.config.js",
5+
themeConfig: "./src/theme.config.jsx",
66
latex: true,
7-
flexsearch: {
8-
codeblock: false,
7+
search: {
8+
codeblocks: false,
99
},
1010
});
1111

package-lock.json

Lines changed: 2336 additions & 2140 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@
1010
"start": "next start"
1111
},
1212
"dependencies": {
13-
"@radix-ui/react-icons": "^1.3.0",
14-
"@radix-ui/react-tooltip": "^1.1.2",
15-
"class-variance-authority": "^0.7.0",
13+
"@radix-ui/react-icons": "^1.3.2",
14+
"@radix-ui/react-tooltip": "^1.1.6",
15+
"class-variance-authority": "^0.7.1",
1616
"clsx": "^2.1.1",
17-
"next": "^14.2.7",
18-
"nextra": "^2.13.4",
19-
"nextra-theme-docs": "^2.13.4",
17+
"next": "^15.1.4",
18+
"nextra": "^3.3.1",
19+
"nextra-theme-docs": "^3.3.1",
2020
"react": "^18.3.1",
2121
"react-dom": "^18.3.1",
2222
"sharp": "^0.33.5",
23-
"tailwind-merge": "^2.5.2",
23+
"tailwind-merge": "^2.6.0",
2424
"tailwindcss-animate": "^1.0.7"
2525
},
2626
"devDependencies": {
2727
"autoprefixer": "^10.4.20",
2828
"git-format-staged": "^3.1.1",
2929
"gray-matter": "^4.0.3",
30-
"husky": "^9.1.5",
31-
"postcss": "^8.4.41",
32-
"prettier": "3.3.3",
33-
"prettier-plugin-tailwindcss": "^0.6.6",
34-
"tailwindcss": "^3.4.10"
30+
"husky": "^9.1.7",
31+
"postcss": "^8.4.49",
32+
"prettier": "3.4.2",
33+
"prettier-plugin-tailwindcss": "^0.6.9",
34+
"tailwindcss": "^3.4.17"
3535
}
3636
}

src/components/TagDots.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import {
2-
Tooltip,
3-
TooltipContent,
4-
TooltipTrigger,
5-
} from "@/components/ui/tooltip";
1+
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
62
import tagsObj from "@/utils/tags.json";
73
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
84
import Link from "next/link";

src/components/TagFilter.jsx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import tagsObj from "@/utils/tags.json";
2-
import { useRouter } from "next/router";
32
import { useSearchParams } from "next/navigation";
3+
import { useRouter } from "next/router";
44
import TagPill from "./TagPill";
55

66
export default function TagFilter() {
@@ -9,16 +9,11 @@ export default function TagFilter() {
99
const urlTags = searchParams.getAll("tag");
1010

1111
const routes = Object.entries(tagsObj.routes)
12-
.filter(
13-
([, tags]) =>
14-
!urlTags.length || urlTags.find((urlTag) => tags.includes(urlTag)),
15-
)
12+
.filter(([, tags]) => !urlTags.length || urlTags.find((urlTag) => tags.includes(urlTag)))
1613
.map(([route]) => route)
1714
.sort();
1815

19-
const minRouteDepth = Math.min(
20-
...routes.map((route) => route.match(/\//gi).length),
21-
);
16+
const minRouteDepth = Math.min(...routes.map((route) => route.match(/\//gi).length));
2217

2318
const toggleTag = (selectedTag) => {
2419
let newTags = [];
@@ -34,17 +29,10 @@ export default function TagFilter() {
3429

3530
return (
3631
<>
37-
<p className="my-4">
38-
Select one or more tags to list its associated articles
39-
</p>
32+
<p className="my-4">Select one or more tags to list its associated articles</p>
4033
<div className="my-4 flex flex-wrap gap-2">
4134
{tagsObj.allTags.map((tag) => (
42-
<TagPill
43-
key={tag}
44-
tag={tag}
45-
onClick={() => toggleTag(tag)}
46-
checked={urlTags.includes(tag)}
47-
/>
35+
<TagPill key={tag} tag={tag} onClick={() => toggleTag(tag)} checked={urlTags.includes(tag)} />
4836
))}
4937
</div>
5038
{routes.length ? (
File renamed without changes.

src/pages/_meta.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export default {
2+
index: "Welcome",
3+
core: "CosmWasm Core",
4+
wasmd: "Wasmd",
5+
ibc: "IBC",
6+
sylvia: "Sylvia",
7+
storey: "Storey",
8+
"cw-storage-plus": "StoragePlus",
9+
"cw-multi-test": "MultiTest",
10+
"how-to-doc": "How to doc",
11+
tags: {
12+
display: "hidden",
13+
},
14+
tutorial: "Tutorial",
15+
};

src/pages/_meta.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/pages/core/_meta.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export default {
2+
installation: "Installation",
3+
entrypoints: "Entrypoints",
4+
architecture: "Architecture",
5+
"standard-library": "Standard Library",
6+
conventions: "Conventions",
7+
advanced: "Advanced",
8+
specification: "Specification",
9+
};

src/pages/core/_meta.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)