test
This commit is contained in:
parent
67396c8d7e
commit
2ccb3e5bc6
@ -4,7 +4,7 @@ import yaml from 'js-yaml';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import { Heading } from '@chakra-ui/react';
|
||||
import MDXComponents from '../components/';
|
||||
|
||||
import { ParsedUrlQuery } from 'querystring';
|
||||
import type { GetStaticPaths, GetStaticProps, NextPage } from 'next';
|
||||
|
||||
const MATTER_OPTIONS = {
|
||||
@ -38,15 +38,10 @@ export const getStaticPaths: GetStaticPaths = () => {
|
||||
};
|
||||
};
|
||||
|
||||
interface Context {
|
||||
params: {
|
||||
slug: string[];
|
||||
}
|
||||
}
|
||||
|
||||
// Reads file data for markdown pages
|
||||
export const getStaticProps: GetStaticProps = async (context: Context) => {
|
||||
const filePath = context.params.slug.join('/')
|
||||
export const getStaticProps: GetStaticProps = async context => {
|
||||
const { slug } = context.params as ParsedUrlQuery
|
||||
const filePath = (slug as string[])!.join('/')
|
||||
let file
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user