@makerx/repository-website-generator / pages
Table of contents
Functions
Functions
default
▸ default(props
): Element
Parameters
Name | Type |
---|---|
props | IndexPageProps |
Returns
Element
Defined in
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