From 024a5595a0f43b9f6531ada7495b09ae1021b4c5 Mon Sep 17 00:00:00 2001 From: architavasuki Date: Thu, 21 Aug 2025 19:32:06 -0400 Subject: [PATCH] feat: add Plausible analytics and migrate Next config to ESM - Add Plausible tracking script in theme.config.tsx - Replace next.config.js with next.config.mjs (fix Nextra exports error) --- next.config.js | 25 ------------------------- next.config.mjs | 25 +++++++++++++++++++++++++ theme.config.tsx | 10 ++++++++++ 3 files changed, 35 insertions(+), 25 deletions(-) delete mode 100644 next.config.js create mode 100644 next.config.mjs diff --git a/next.config.js b/next.config.js deleted file mode 100644 index 19727ea..0000000 --- a/next.config.js +++ /dev/null @@ -1,25 +0,0 @@ -const withNextra = require('nextra')({ - theme: 'nextra-theme-docs', - themeConfig: './theme.config.tsx', - latex: true, - defaultShowCopyCode: true -}) - -module.exports = withNextra( - { - async redirects() { - return [ - { - source: '/', - destination: '/home/explore', - permanent: true, - }, - ]; - }, - } -) - -// If you have other Next.js configurations, you can pass them as the parameter: -// module.exports = withNextra({ /* other next.js config */ }) -// Learn more: https://nextra.site/docs/guide - diff --git a/next.config.mjs b/next.config.mjs new file mode 100644 index 0000000..5fdf4a1 --- /dev/null +++ b/next.config.mjs @@ -0,0 +1,25 @@ +import nextra from 'nextra' + +const withNextra = nextra({ + theme: 'nextra-theme-docs', + themeConfig: './theme.config.tsx', + latex: true, + defaultShowCopyCode: true +}) + +/** @type {import('next').NextConfig} */ +const nextConfig = { + async redirects() { + return [ + { + source: '/', + destination: '/home/explore', + permanent: true + } + ] + } +} + +export default withNextra(nextConfig) + + diff --git a/theme.config.tsx b/theme.config.tsx index 7c6bf10..4411281 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -54,6 +54,16 @@ const config: DocsThemeConfig = { + +