Skip to content

Chore - update basic setup guide to mention an index.js file #293

@jasonbahl

Description

@jasonbahl

👋🏻 if I don't have a /src/pages/index.js file, things don't work well.

This could either be a hard-coded page or a faust page, such as:

import { getWordPressProps, WordPressTemplate } from "@faustwp/core"

export default function Page(props: any) {
  return <WordPressTemplate {...props} />
}

export function getStaticProps(ctx: any) {
  return getWordPressProps({ ctx })
}

(see: https://github.com/wp-graphql/wpgraphql.com/blob/master/src/pages/index.js)

but the [...wordPressNode] catch all doesn't seem to play nice with the / route.

For me, I still want to use WordPress + Faust on my home page, so I added an index.js file like the above. This should be called out in the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions