From c5c5c59ac853641086b6b3bd2f5bbb511c82b580 Mon Sep 17 00:00:00 2001 From: Rajat Rajdeep <46029666+RajatRajdeep@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:25:37 +0530 Subject: [PATCH] Add static export in nextconfig (#51) --- .github/workflows/nextjs.yml | 4 +--- data/conference.js | 4 ++-- next.config.mjs | 5 ++++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 32f2789..cf1f848 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -74,9 +74,7 @@ jobs: - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - name: Build with Next.js - run: | - ${{ steps.detect-package-manager.outputs.runner }} next build - ${{ steps.detect-package-manager.outputs.runner }} next export + run: ${{ steps.detect-package-manager.outputs.runner }} next build - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/data/conference.js b/data/conference.js index 9984b73..bc81d81 100644 --- a/data/conference.js +++ b/data/conference.js @@ -28,8 +28,8 @@ export const KEY_LINKS = { sponsorshipProspectusLabel: 'SPONSORSHIP PROSPECTUS', sponsorshipProspectusUrl: 'https://drive.google.com/file/d/15gfdVu8FyVP9-zohx_y56jmW1v-2DUid/view?usp=sharing', - konfHubEventPageLabel: 'KonfHub event page', - konfHubEventPage: 'https://konfhub.com/pyconf-hyderabad-2025' + konfHubEventPageLabel: 'KonfHub event page', + konfHubEventPage: 'https://konfhub.com/pyconf-hyderabad-2025', }; export const SOCIALS = [ diff --git a/next.config.mjs b/next.config.mjs index 33a42c3..77327b6 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -2,11 +2,14 @@ import createMDX from '@next/mdx'; /** @type {import('next').NextConfig} */ const nextConfig = { + output: 'export', // Configure `pageExtensions` to include markdown and MDX files pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'], }; -const withMDX = createMDX({}); +const withMDX = createMDX({ + extension: /\.mdx?$/, // Include .mdx files +}); // Merge MDX config with Next.js config export default withMDX(nextConfig);