Skip to content

Commit

Permalink
feat: Bump nextra to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
karolkarolka committed Dec 9, 2024
1 parent 5d29850 commit c80320c
Show file tree
Hide file tree
Showing 11 changed files with 2,263 additions and 1,669 deletions.
2 changes: 1 addition & 1 deletion apps/docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
11 changes: 9 additions & 2 deletions apps/docs/next.config.js → apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
const withNextra = require("nextra")({
import nextra from "nextra";

const withNextra = nextra({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
latex: true,
search: {
codeblocks: false,
},
});

module.exports = withNextra({
export default withNextra({
reactStrictMode: true,
webpack(config) {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find((rule) =>
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"start": "next start"
},
"dependencies": {
"next": "^13.0.6",
"nextra": "2.13.4",
"nextra-theme-docs": "2.13.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"next": "15.0.3",
"nextra": "3.2.4",
"nextra-theme-docs": "3.2.4",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@nimara/config": "workspace:*",
Expand Down
3 changes: 3 additions & 0 deletions apps/docs/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function App({ Component, pageProps }) {

Check failure on line 1 in apps/docs/pages/_app.tsx

View workflow job for this annotation

GitHub Actions / Linters & Test

Prefer named exports
return <Component {...pageProps} />;
}
4 changes: 0 additions & 4 deletions apps/docs/pages/_meta.json

This file was deleted.

4 changes: 4 additions & 0 deletions apps/docs/pages/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {

Check failure on line 1 in apps/docs/pages/_meta.ts

View workflow job for this annotation

GitHub Actions / Linters & Test

Prefer named exports
index: "Overview",
quickstart: "Quickstart",
};
2 changes: 0 additions & 2 deletions apps/docs/pages/quickstart/running-locally.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Steps } from "nextra/components";

# Running Locally

To run a local development environment, you need to set up the Saleor instance first. You can use a free developer account at [Saleor Cloud](https://docs.saleor.io/cloud) to start quickly with the backend. Alternatively, you can run [Saleor locally](https://docs.saleor.io/quickstart/running-locally) using Docker.
28 changes: 17 additions & 11 deletions apps/docs/theme.config.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
import type { DocsThemeConfig } from "nextra-theme-docs";
import { type DocsThemeConfig, useConfig } from "nextra-theme-docs";

import Logo from "./images/logo.svg";

const config: DocsThemeConfig = {
head: () => {
const { frontMatter } = useConfig();

Check failure on line 7 in apps/docs/theme.config.tsx

View workflow job for this annotation

GitHub Actions / Linters & Test

Expected blank line after variable declarations
return (

Check failure on line 8 in apps/docs/theme.config.tsx

View workflow job for this annotation

GitHub Actions / Linters & Test

Expected newline before return statement
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
property="og:title"
content={`${frontMatter.title} | Nimara Storefront`}
/>
</>
);
},
logo: <Logo />,
logoLink: "https://www.demo.nimara.store/",
project: {
link: "https://github.com/mirumee/nimara-ecommerce/tree/main/apps/storefront/",
link: "https://github.com/mirumee/nimara-ecommerce/tree/main/apps/storefront",
},
docsRepositoryBase:
"https://github.com/mirumee/nimara-ecommerce/tree/main/apps/docs/",
"https://github.com/mirumee/nimara-ecommerce/tree/main/apps/docs",
chat: {
link: "https://discord.com/channels/1271065464407068702/",
link: "https://discord.com/channels/1271065464407068702",
},
footer: {
text: `© Nimara ${new Date().getFullYear()}`,
},
useNextSeoProps() {
return {
titleTemplate: "%s – Nimara",
};
content: `© Nimara ${new Date().getFullYear()}`,
},
};

// eslint-disable-next-line import/no-default-export
export default config;

Check failure on line 33 in apps/docs/theme.config.tsx

View workflow job for this annotation

GitHub Actions / Linters & Test

Prefer named exports
2 changes: 1 addition & 1 deletion apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "pages/_index.mdx"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"access": "public"
},
"dependencies": {
"eslint-config-next": "14.0.3",
"eslint-config-next": "15.0.3",
"eslint-config-prettier": "^9.0.0",
"eslint-config-turbo": "^1.10.16",
"eslint-import-resolver-node": "^0.3.6",
Expand Down
Loading

0 comments on commit c80320c

Please sign in to comment.