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

[WIP] External Data Sources - Headless Wordpress PoC #211

Closed
wants to merge 4 commits into from

Conversation

hutchgrant
Copy link
Member

@hutchgrant hutchgrant commented Sep 25, 2019

Related Issue

Resolves #21

Summary of Changes

Created a new lifecycle called sources, which simply pulls from sources, populates a graph, and then scaffolds out components from each post. In this example, I'm pulling posts from a wordpress instance into graph, creating components and routes, rendering statically using greenwood. This could be applied to other wordpress features, or any other CMS.

Development

You can now test this out using docker via docker-compose.

# to run in detached mode add -d argument
$ docker-compose up

# wait a few minutes for containers to start up and connect to each other
# wordpress should be accessible via http://localhost:8004
# in another shell or same (if running detached)
$ yarn serve

You should now see the wordpress post from http://localhost:8004/test-greenwood-headless-1/ available at http://localhost:8000/test-greenwood-headless-1/ within greenwood

A second post http://localhost:8004/test-greenwood-headless-2/ should be available at http://localhost:8000/test-greenwood-headless-2/ within greenwood

our test wordpress container has a username and password: greenwood which should be set by default with the included sql dump.

TODO

  • Working PoC of basic posts in greenwood from a wordpress instance
  • Merge and apply conditions so that it works alongside wc-md-loader
  • Create an easy to duplicate development environment with wordpress using docker
  • refine and modularize lifecycles API so that it can be made into a wordpress plugin, seperate from greenwood core.

Copy link
Member

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just scanning this and looks pretty cool @hutchgrant! Will definitely look to pull this down soon and play around with it.

If things are looking good locally we should plan to try and get a WP LightSail instance up in AWS and we can do it for "real".

From there we can work on making it a plugin, refactoring, and all that jazz once the release/0.4.0 branch gets merged in master and brings in all the monorepo stuff.

@thescientist13 thescientist13 added the RFC Proposal and changes to workflows, architecture, APIs, etc label Nov 9, 2019
@thescientist13
Copy link
Member

closing this for now since a big refactor is underway. This issue will definitely be re-visited as part of the Roadmap to 1.0 Project, after the release of the refactor.

@thescientist13 thescientist13 deleted the rfc/issue-21-external-data-sources-wp branch July 20, 2022 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Content as Data help wanted Extra attention is needed RFC Proposal and changes to workflows, architecture, APIs, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] External Data (Graph) Sources
2 participants