From 4a7eecef49cf98c4027bd2704649f42ded1bbf02 Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 12 Mar 2022 09:55:56 +0000 Subject: [PATCH] Attempt at rewriting .md file in Next router --- .gitignore | 1 + site/config/next.config.js | 10 ++++++++++ site/pages/_app.js | 1 + 3 files changed, 12 insertions(+) create mode 100644 .gitignore create mode 100644 site/config/next.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dd33554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.obsidian diff --git a/site/config/next.config.js b/site/config/next.config.js new file mode 100644 index 0000000..f9117e3 --- /dev/null +++ b/site/config/next.config.js @@ -0,0 +1,10 @@ +module.exports = { + async rewrites() { + return [ + { + source: '/concepts/:page(.md)', + destination: '/concepts/:page', + }, + ] + }, +} diff --git a/site/pages/_app.js b/site/pages/_app.js index 9eb4397..73bd526 100644 --- a/site/pages/_app.js +++ b/site/pages/_app.js @@ -6,6 +6,7 @@ import { ThemeProvider } from 'next-themes' import '../styles/global.css' import siteConfig from '../config/siteConfig.js' +import nextConfig from '../config/next.config.js' import Layout from '../components/Layout' import MdxPage from '../components/MDX' import * as gtag from '../lib/gtag'