@makerx/repository-website-generator / pages/docs/[slug]
Table of contents
Functions
Functions
default
▸ default(props
): Element
Parameters
Name | Type |
---|---|
props | CodeDocPageProps |
Returns
Element
Defined in
getStaticPaths
▸ getStaticPaths(context
): GetStaticPathsResult
<ParsedUrlQuery
> | Promise
<GetStaticPathsResult
<ParsedUrlQuery
>>
Define a list of paths to be statically generated if dynamic routes exist.
Link
https://nextjs.org/docs/basic-features/data-fetching/get-static-paths
Link
https://nextjs.org/docs/basic-features/typescript#static-generation-and-server-side-rendering
Example
export const getStaticPaths: GetStaticPaths = async () => { // ... }
Parameters
Name | Type |
---|---|
context | GetStaticPathsContext |
Returns
GetStaticPathsResult
<ParsedUrlQuery
> | Promise
<GetStaticPathsResult
<ParsedUrlQuery
>>
Defined in
node_modules/next/types/index.d.ts:221
getStaticProps
▸ getStaticProps(context
): GetStaticPropsResult
<{ [key: string]
: any
; }> | Promise
<GetStaticPropsResult
<{ [key: string]
: any
; }>>
Static Site Generation feature for Next.js.
Link
https://nextjs.org/docs/basic-features/data-fetching/get-static-props
Link
https://nextjs.org/docs/basic-features/typescript#static-generation-and-server-side-rendering
Example
export const getStaticProps: GetStaticProps = async (context) => { // ... }
Parameters
Name | Type |
---|---|
context | GetStaticPropsContext <ParsedUrlQuery , PreviewData > |
Returns
GetStaticPropsResult
<{ [key: string]
: any
; }> | Promise
<GetStaticPropsResult
<{ [key: string]
: any
; }>>
Defined in
node_modules/next/types/index.d.ts:185