mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-04-27 03:52:24 +00:00
test
This commit is contained in:
parent
67396c8d7e
commit
2ccb3e5bc6
1 changed files with 4 additions and 9 deletions
|
|
@ -4,7 +4,7 @@ import yaml from 'js-yaml';
|
||||||
import ReactMarkdown from 'react-markdown';
|
import ReactMarkdown from 'react-markdown';
|
||||||
import { Heading } from '@chakra-ui/react';
|
import { Heading } from '@chakra-ui/react';
|
||||||
import MDXComponents from '../components/';
|
import MDXComponents from '../components/';
|
||||||
|
import { ParsedUrlQuery } from 'querystring';
|
||||||
import type { GetStaticPaths, GetStaticProps, NextPage } from 'next';
|
import type { GetStaticPaths, GetStaticProps, NextPage } from 'next';
|
||||||
|
|
||||||
const MATTER_OPTIONS = {
|
const MATTER_OPTIONS = {
|
||||||
|
|
@ -38,15 +38,10 @@ export const getStaticPaths: GetStaticPaths = () => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
interface Context {
|
|
||||||
params: {
|
|
||||||
slug: string[];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reads file data for markdown pages
|
// Reads file data for markdown pages
|
||||||
export const getStaticProps: GetStaticProps = async (context: Context) => {
|
export const getStaticProps: GetStaticProps = async context => {
|
||||||
const filePath = context.params.slug.join('/')
|
const { slug } = context.params as ParsedUrlQuery
|
||||||
|
const filePath = (slug as string[])!.join('/')
|
||||||
let file
|
let file
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue