Skip to content
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

feat: Bump nextra to v3 #108

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/docs/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ module.exports = {
tsconfigRootDir: __dirname,
sourceType: "module",
},
overrides: [
{
files: ["**/*.{ts,tsx}"],
rules: {
"import/no-default-export": "off",
},
},
],
};
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 }) {
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 {
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.
29 changes: 18 additions & 11 deletions apps/docs/theme.config.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
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();

return (
<>
<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;
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
Loading