Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PageConfig ¶
type PageConfig struct {
ComponentPath string
Mode PageMode
PropsLoader PropsLoader
StaticDataLoader StaticDataLoader
}
type PageOption ¶
type PageOption func(*PageConfig)
func WithClientOnly ¶
func WithClientOnly() PageOption
func WithPropsLoader ¶
func WithPropsLoader(loader PropsLoader) PageOption
func WithStaticDataLoader ¶
func WithStaticDataLoader(loader StaticDataLoader) PageOption
func WithStaticPrerender ¶
func WithStaticPrerender() PageOption
type RedirectError ¶
type RenderedPage ¶
type StaticDataLoader ¶
type StaticDataLoader func(context.Context) ([]StaticPathData, error)
StaticDataLoader is called at build time to generate dynamic static paths It returns a list of paths and their corresponding props Example: returning [{Path: "/blog/hello", Props: {slug: "hello"}}] will generate a prerendered page at /blog/hello with those props
type StaticPathData ¶
StaticPathData represents a single path and its props for static prerendering
Click to show internal directories.
Click to hide internal directories.