From 6370fbcf68496d721b8571bfc8e555d11dc4cc4a Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:26:25 +0000 Subject: [PATCH] chore: Nextra suggestions * `_app.tsx` -> `_app.mdx` * `output: 'export'` in `next.config.js` * max fetch depth for CI to correct "latest modified" times --- .github/workflows/nextjs.yml | 2 ++ .github/workflows/test-build-nextjs.yml | 2 ++ next.config.js | 1 + package.json | 2 +- pages/{_app.tsx => _app.mdx} | 4 +++- 5 files changed, 9 insertions(+), 2 deletions(-) rename pages/{_app.tsx => _app.mdx} (62%) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index c5f88400..fe069f3d 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -30,6 +30,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup Node uses: actions/setup-node@v3 diff --git a/.github/workflows/test-build-nextjs.yml b/.github/workflows/test-build-nextjs.yml index a01cf7a6..a62adcb3 100644 --- a/.github/workflows/test-build-nextjs.yml +++ b/.github/workflows/test-build-nextjs.yml @@ -27,6 +27,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup Node uses: actions/setup-node@v3 diff --git a/next.config.js b/next.config.js index 6b4e6f2b..8f2612c7 100644 --- a/next.config.js +++ b/next.config.js @@ -52,6 +52,7 @@ const withNextra = nextra({ * @type {import('next').NextConfig} */ export default withNextra({ + output: 'export', images: { unoptimized: true }, diff --git a/package.json b/package.json index 928b7184..90989567 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "dev": "yarn deps && yarn clean && next", "build": "yarn deps && yarn clean && next build", "post-build": "echo 'spell checking, link checking, formatting'", - "build-pages": "yarn build && next export && node ./scripts/redirects-generate.js", + "build-pages": "yarn build && node ./scripts/redirects-generate.js", "next": "next" }, "devDependencies": { diff --git a/pages/_app.tsx b/pages/_app.mdx similarity index 62% rename from pages/_app.tsx rename to pages/_app.mdx index e9fbf093..32f0190f 100644 --- a/pages/_app.tsx +++ b/pages/_app.mdx @@ -1,4 +1,6 @@ -// import '../styles.css' +{/* import '../styles.css' */} + +import React from "react" export default function App({ Component, pageProps }) { return