-
Notifications
You must be signed in to change notification settings - Fork 3
Docs: how to setup cpt doc page #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Check out the recent updates to your Headless Platform preview environment:
Learn more about preview environments in our documentation. |
|
Check out the recent updates to your Headless Platform preview environment:
Learn more about preview environments in our documentation. |
|
Check out the recent updates to your Headless Platform preview environment:
Learn more about preview environments in our documentation. |
moonmeister
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, please add the appropriate redirect
|
|
||
| If you haven't already, follow the [Basic Setup](/docs/how-to/basic-setup/) steps to get Faust.js set up. | ||
|
|
||
| ### 2. Download ACF and WPGraphQL for ACF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's include these as part of the prereqs, along with the IDE plugin, as discussed. Maybe reword the prereqs to read: You need a WP instance and the next site. The WP needs plugins XYZ, and the next site needs the Basic Setup complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, @moonmeister the "Basic Setup" doc tells users to do all the setting up of WP instances and Next.js site etc etc. So I can just say do the basic setup and add the 3 plugins
|
|
||
| Download the [Advanced Custom Fields](https://www.advancedcustomfields.com/download/) plugin and the [WPGraphQL for ACF](https://github.com/wp-graphql/wpgraphql-acf) plugin in your WordPress admin. | ||
|
|
||
| ### 3\. Verify Your CPT Was Setup Properly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This title says I'm verifying it, but you never told me to create a custom post type or gave links on how to do that. You go on to do that, but the verify seems misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I should rename that step "Create A CPT" then when I tell them to visit the link to verify it, that should be the "Verify" step.
|
|
||
|  | ||
|
|
||
| Finally, let's check to see if the archive is accessible. Copy and paste this query into the GraphQL IDE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as the above query language
|
|
||
| With possible types generated, we can now start creating Faust templates for our CPTs! | ||
|
|
||
| Before we begin, start the dev server in the Faust app with the dev command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unneeded as of yet. Let's leave it till its critical
| }; | ||
| ``` | ||
|
|
||
| You now have a movie template registered to your Faust.js project. If you visit `http://localhost:3000/movies/office-space` again, you now will see the template resolve properly: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this a sperate step where we verify our template is working and have them start the dev server.
|
Check out the recent updates to your Headless Platform preview environment:
Learn more about preview environments in our documentation. |
Co-authored-by: Alex Moon <[email protected]>
|
Check out the recent updates to your Headless Platform preview environment:
Learn more about preview environments in our documentation. |
|
@moonmeister made the suggested changes along with some re-structuring of steps and written text. Let me know what you think. |
|
Check out the recent updates to your Headless Platform preview environment:
Learn more about preview environments in our documentation. |
No description provided.