1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-23 12:34:29 -04:00

some very minor refactoring/fixing

This commit is contained in:
2021-12-31 08:48:56 -05:00
parent 831f8ffe4c
commit 11d245ad66
19 changed files with 32 additions and 49 deletions

View File

@@ -8,7 +8,7 @@ import Layout from "../../components/Layout";
import Container from "../../components/Container";
import Content from "../../components/Content";
import Meta from "../../components/notes/Meta";
import { notePaths, NOTES_PATH } from "../../lib/parseNotes";
import { notePaths, NOTES_PATH } from "../../lib/parse-notes";
import mdxComponents from "../../components/mdxComponents";
import * as config from "../../lib/config";
import type { GetStaticProps, GetStaticPaths } from "next";
@@ -102,7 +102,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
export const getStaticPaths: GetStaticPaths = async () => {
const paths = notePaths
// Remove file extensions for page paths
.map((path) => path.replace(/\.mdx?$/, ""))
.map((notePath) => notePath.replace(/\.mdx?$/, ""))
// Map the path into the static paths object required by Next.js
.map((slug) => ({ params: { slug } }));