Skip to content
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

Preview page in CMS #70

Open
11 tasks
simonrjones opened this issue Jan 20, 2020 · 3 comments
Open
11 tasks

Preview page in CMS #70

simonrjones opened this issue Jan 20, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@simonrjones
Copy link
Member

Allow a CMS editor user to view pages on the frontend from WordPress, both when viewing a published page and when viewing an unpublished draft page (preview).

Dependant on #63

Work
Basic functionality:

  • WordPress plugin to view a page in WordPress in the frontend (use API to retrieve frontend URL based on CMS post ID)

Prerequisites for preview functionality:

  • Work out a way to auth against WP REST API from an external location (frontend), e.g. https://wordpress.org/plugins/application-passwords/ or https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/
  • Create preview URL for frontend (e.g. preview.domain.com) which serves same content but requires authentication
  • Create basic login page for preview URL which should then authenticate. Support two models: 1) CMS (WordPress), 2) stored credentials in .users file (or similar), do not commit to version control
  • WordPress API endpoint to return draft content when authenticated by API token

Preview functionality:

  • WordPress plugin to preview the current page, "Preview" button which does the following:
    • Saves draft content in WP
    • User visits preview domain URL
    • User logs into preview site (via WordPress)
    • Preview site requests draft content from WordPress API
    • Load Preview content into web page and display to user
@simonrjones simonrjones added enhancement New feature or request priority labels Jan 20, 2020
@simonrjones simonrjones added this to the 0.7.0 milestone Jan 20, 2020
@simonrjones simonrjones self-assigned this Jan 20, 2020
@simonrjones
Copy link
Member Author

User flow for Headless CMS preview from WordPress

@simonrjones
Copy link
Member Author

see Netlify's approach to this https://www.netlifycms.org/docs/deploy-preview-links/

@simonrjones
Copy link
Member Author

@simonrjones simonrjones modified the milestones: 0.7.0, 0.8.0 May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant