Giter VIP home page Giter VIP logo

gatsby-wordpress's Introduction

ARCHIVED:

See the Platform.sh Gatsby Wordpress template for current repository.

Gatsby Wordpress multi-app for Platform.sh

Deploy on Platform.sh

This template builds a multi-app project using Gatsby as its frontend and a Wordpress backend to store content using Gatsby's Wordpress source plugin.

Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps, and WordPress is a blogging and lightweight CMS written in PHP.

Services

  • Node.js 12
  • PHP 7.3
  • MariaDB 10.4

Post-install

  1. When you initially deploy the template, you will receive a 403 error on the base route. There is not yet any content to build the Gatsby site, because Wordpress has not yet been fully installed. Visit the backend.<generated url> subdomain, and run through the Wordpress installer as normal. You will not be asked for database credentials as those are already provided.
  2. Once you have completed the Wordpress install, redeploy the environment with platform redeploy -p <PROJECT ID> -e master.

Customizations

The following files and additions make the framework work. If using this project as a reference for your own existing project, replicate the changes below to your project.

  • The .platform.app.yaml, .platform/services.yaml, and .platform/routes.yaml files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
  • Additional Platform.sh configuration reader modules for both PHP and Node.js have been added. They provide convenience wrappers for accessing the Platform.sh environment variables.
  • gatsby-config.js has been modified to read the Wordpress backend url and assign it to the baseUrl attribute for the gatsby-source-wordpress plugin. Since routes are not available during the build hook, and since we want this value to be generated and unique on each environment, gatsby build runs and pulls in content from the Wordpress app during the post_deploy hook on the mounted public directory. gatbsby-source-wordpress can have additional parameters set to modify your configuration, so consult the documentation.

References

gatsby-wordpress's People

Contributors

chadwcarlson avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.