{"id":25558503,"url":"https://github.com/onepagezen/ob-frontend","last_synced_at":"2025-04-12T03:40:20.866Z","repository":{"id":55485217,"uuid":"297507922","full_name":"onepagezen/ob-frontend","owner":"onepagezen","description":"ob-frontend is a headless WordPress starter theme built with Gatsby.","archived":false,"fork":false,"pushed_at":"2020-12-27T18:48:41.000Z","size":624,"stargazers_count":8,"open_issues_count":7,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T19:04:56.046Z","etag":null,"topics":["blog","bloomer","cloud-computing","gatsby","gatsby-plugin","gatsby-wordpress","gatsby-wordpress-theme","google-cloud-platform","graphql","headless-cms","headless-wordpress","jamstack","mailchimp","netlify","ob-frontend","react","static","wordpress","wordpress-backend","wordpress-frontend"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onepagezen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-22T01:57:47.000Z","updated_at":"2023-05-12T17:00:43.000Z","dependencies_parsed_at":"2022-08-15T01:20:57.502Z","dependency_job_id":null,"html_url":"https://github.com/onepagezen/ob-frontend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepagezen%2Fob-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepagezen%2Fob-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepagezen%2Fob-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepagezen%2Fob-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onepagezen","download_url":"https://codeload.github.com/onepagezen/ob-frontend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514241,"owners_count":21116899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","bloomer","cloud-computing","gatsby","gatsby-plugin","gatsby-wordpress","gatsby-wordpress-theme","google-cloud-platform","graphql","headless-cms","headless-wordpress","jamstack","mailchimp","netlify","ob-frontend","react","static","wordpress","wordpress-backend","wordpress-frontend"],"created_at":"2025-02-20T16:18:42.047Z","updated_at":"2025-04-12T03:40:20.836Z","avatar_url":"https://github.com/onepagezen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003cimg alt=\"ob-frontend\" title=\"ob-frontend\" src=\"https://storage.googleapis.com/ob-frontend/ob-frontend-beta-logo.png\" width=\"400\"/\u003e\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003e\n    \u003cstrong\u003eob-frontend\u003c/strong\u003e is a \u003ca href=\"https://www.gatsbyjs.com/docs/glossary/headless-wordpress/\"\u003eheadless\u003c/a\u003e WordPress starter theme built with \u003ca href=\"https://www.gatsbyjs.com/docs/\"\u003eGatsby\u003c/a\u003e.\n\u003c/h4\u003e \n\u003ch4 align=\"center\"\u003e\n\u003ca target=\"_blank\" href=\"https://circleci.com/gh/onepagezen/ob-frontend\"\u003e\u003cimg src=\"https://circleci.com/gh/onepagezen/ob-frontend.svg?style=svg\"\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca target=\"_blank\" href=\"https://www.npmjs.com/package/ob-frontend\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/ob-frontend\"\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca target=\"_blank\" href=\"https://www.codacy.com/gh/onepagezen/ob-frontend/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=onepagezen/ob-frontend\u0026amp;utm_campaign=Badge_Grade\"\u003e\u003cimg src=\"https://app.codacy.com/project/badge/Grade/9900769f6c4b4c4985810ce044f7c6c0\"\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca target=\"_blank\" href=\"https://www.npmjs.com/package/ob-frontend\"\u003e\u003cimg src=\"https://img.shields.io/github/issues-raw/onepagezen/ob-frontend\"\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca target=\"_blank\" href=\"https://github.com/onepagezen/ob-frontend#license\"\u003e\u003cimg src=\"https://img.shields.io/github/license/onepagezen/ob-frontend\"\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\n\u003c/h4\u003e\n\n## Table of contents  \n+   [Overview](#overview)  \n+   [Demo](#demo)  \n+   [Screenshots](#screenshots)  \n+   [Features](#features)  \n+   [Core Dependencies](#core-dependencies)  \n+   [Directory Structure](#directory-structure)  \n+   [Quick Start](#quick-start)  \n+   [Deploy with Netlify](#deploy-to-netlify)  \n+   [Credits](#credits)  \n+   [Contributors](#contributors)  \n+   [License](#license)  \n## Overview  \n**ob-frontend** is a modern implementation of the WordPress frontend as a [single-page application (SPA)](https://docs.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/choose-between-traditional-web-and-single-page-apps#when-to-choose-spas).  This template, developed and packaged as a [Gatsby starter](https://www.gatsbyjs.com/docs/starters/), is a [solution](https://searchitchannel.techtarget.com/definition/solution) for developers looking for the ease-of-use and flexibility that comes with using WordPress as a [CMS](https://www.hostinger.com/tutorials/what-is-wordpress), paired with the familiar development experience and modern UI features of a [React](https://reactjs.org/)/[GraphQL](https://graphql.org/) implementation.  The **ob-frontend** Gatsby Starter attempts to closely mirror many of the core features and functionality of the familiar WordPress UI, such as nested comments, post sidebar layout, and a mailing list widget.  \n## Demo\nView a live demo of this application **[here](https://ob-frontend.netlify.app/)**.  \n## Screenshots  \n\u003ch1 align=\"left\"\u003e\n    \u003cimg alt=\"ob-frontend-screenshot-1\" title=\"ob-frontend-screenshot-1\" src=\"https://storage.googleapis.com/ob-frontend/ob-frontend-app-screenshot-1.png\" width=\"600\"\u003e\n\u003c/h1\u003e\n\u003ch1 align=\"left\"\u003e\n    \u003cimg alt=\"ob-frontend-screenshot-2\" title=\"ob-frontend-screenshot-2\" src=\"https://storage.googleapis.com/ob-frontend/ob-frontend-app-screenshot-2.png\" width=\"600\"\u003e\n\u003c/h1\u003e\n\u003ch1 align=\"left\"\u003e\n    \u003cimg alt=\"ob-frontend-screenshot-3\" title=\"ob-frontend-screenshot-3\" src=\"https://storage.googleapis.com/ob-frontend/ob-frontend-app-screenshot-3.png\" width=\"600\"\u003e\n\u003c/h1\u003e\n\u003ch1 align=\"left\"\u003e\n    \u003cimg alt=\"ob-frontend-screenshot-4\" title=\"ob-frontend-screenshot-4\" src=\"https://storage.googleapis.com/ob-frontend/ob-frontend-app-screenshot-4.png\" width=\"600\"\u003e\n\u003c/h1\u003e\n\n## Features  \n+   Post, page, and comment list functionality supported by [Apollo client](https://www.apollographql.com/docs/react/).  \n+   Modern UI powered by [Bloomer](https://bloomer.js.org) React components for Bulma.  \n+   Feature-rich design capabilities supported by [Sass](https://sass-lang.com).  \n+   Dynamic support for changing theme colors.  \n+   Support for featured posts on homepage.  \n+   Mailing list integration with [Mailchimp](https://mailchimp.com).  \n+   Functionality for searching posts.  \n+   Support for threaded (nested) comments 2 levels deep.  \n+   Functionality for posting top-level (parent) comments.  \n+   Functionality for adding replies to nested (child) comments.  \n+   Mobile-first responsive design.  \n+   Pagination support.  \n+   [React-icons](https://react-icons.github.io/).  \n## Core Dependencies  \n+   [WordPress](https://en.wikipedia.org/wiki/WordPress) backend (tested with 5.5)  \n+   [WPGraphQL](https://www.wpgraphql.com/) (requires 0.13.1 or earlier)\n+   [Node.js](https://nodejs.org/en/about/) (tested with 14.02)\n+   [Gatsby CLI](https://www.gatsbyjs.com/docs/gatsby-cli/) (tested with 2.12.21)  \n+   [GraphQL](https://graphql.org/) (tested with 15.0)  \n+   [Apollo Client](https://www.apollographql.com/docs/react/) (tested with 2.6.10)  \n## Directory Structure\n```sh\n📂 src  \n├──📂 apollo # Apollo Client integration  \n├──📂 comments # comment functionality for posts  \n├──📂 components # layout and SEO components  \n├──📂 images # local site images  \n├──📂 mailchimp # mailing list integration  \n├──📂 pages # all site pages  \n├──📂 search # search and retrieve posts by query  \n├──📂 styles # SCSS for styling  \n└──📂 templates # dynamically generate posts and pages  \n```  \n## Quick Start  \n### 1.  Deploy a WordPress backend  \nThis starter theme relies on a WordPress backend from which to fetch data related to WordPress posts, pages, comments, etc.  You can deploy the WordPress backend using the hosting provider of your choice.  Before moving to step 2, you must complete the following:  \n+   Your WordPress backend must be populated with one of each of the following: a post, a page, a comment, and a featured image.  \n+   A [tag](https://wordpress.com/support/posts/tags/#adding-tags-via-the-tags-module) of *featured* must be added to any posts you want to appear on the **Featured Posts** section of the homepage.  \n### 2.  Configure a domain name  \nConfigure a domain name for your WordPress backend (with HTTPS).  In this example, the WordPress backend is served from a subdomain (cms.example.com), and the WordPress frontend (ie. ob-frontend) is served from the root domain (example.com).  Serving the WordPress backend from a subdomain is optional, however, you will need to change the **SOURCE_URL** environment variable to match the URL of your WordPress backend (see steps 5 and 6). \n### 3.  Create a Gatsby site  \nUse the Gatsby CLI to create a new site, specifying the ob-frontend starter.  \n```sh  \n# Create a new Gatsby site using the ob-frontend starter  \ngatsby new blog https://github.com/onepagezen/ob-frontend  \n```  \n### 4.  Create environment variable files  \nThis theme relies heavily on enivronment variables in order to get up and running quickly.  After creating the site using the Gatsby CLI (step 3), run the following commands to configure the environment variables for your site:  \n```sh  \n# Navigate into your new site's directory  \ncd ob-frontend  \n\n# Create .env files for both the development and production environments  \ntouch .env.development .env.production  \n```  \n### 5.  Add development environment variables   \nAdd the following environment variables to your **.env.development** file, making sure to replace **example.com** with your own domain name, and **MAILCHIMP_ENDPOINT** with the [form action URL](https://secomapp.zendesk.com/hc/en-us/articles/360031503791-How-to-find-the-MailChimp-Form-Action-URL-) of your MailChimp mailing list:  \n```sh\nSITE_URL=https://localhost:8000\nBASE_URL=cms.example.com\nBASE_URL_PROTOCOL=https\nSOURCE_URL=https://cms.example.com\nREPLACEMENT_URL=localhost:8000\nGATSBY_CLIENT_URL=https://cms.example.com/graphql\nMAILCHIMP_ENDPOINT=https://example.us17.list-manage.com/subscribe/post?u=0893ac8473c98fa98eeef3fd5\u0026amp;id=f4cbbd81d6\n```\n### 6.  Add production environment variables  \nAdd the following environment variables to your **.env.production** file, making sure to replace **example.com** with your own domain name, and **MAILCHIMP_ENDPOINT** with the endpoint of your Mailchimp mailing list:\n```sh\nSITE_URL=https://example.com\nBASE_URL=cms.example.com\nBASE_URL_PROTOCOL=https\nSOURCE_URL=https://cms.example.com\nREPLACEMENT_URL=example.com\nGATSBY_CLIENT_URL=https://cms.example.com/graphql\nMAILCHIMP_ENDPOINT=https://example.us17.list-manage.com/subscribe/post?u=0893ac8473c98fa98eeef3fd5\u0026amp;id=f4cbbd81d6\n```\n### 7.  Deploy the application  \nWe recommend deploying ob-frontend to [Netlify](https://www.netlify.com), as it integrates well with Gatsby.  To deploy to Netlify, follow the instructions in the [Deploy to Netlify](#deploy-to-netlify) section of this README.  \n## Deploy to Netlify  \n### 1.  Deploy the site  \nUse the **Deploy with Netlify** button to quickly deploy a website based on this starter:  \n\u003ca href=\"https://app.netlify.com/start/deploy?repository=https://github.com/onepagezen/ob-frontend\" target=\"_blank\"\u003e\u003cimg src=\"https://www.netlify.com/img/deploy/button.svg\" alt=\"Deploy to Netlify\"\u003e\u003c/a\u003e  \n\n### 2.  Configure environment variables\nWhen deploying with Netlify, make sure to add the production environment variables to your Netlify build environment.  One option is to add them in your site dashboard under **Settings \u003e Build \u0026 deploy \u003e Environment \u003e Environment variables**.  \n\u003cimg alt=\"netlify-environment-variables\" title=\"netlify-environment-variables\" src=\"https://storage.googleapis.com/ob-frontend/netlify-env-vars.png\" width=\"400\"\u003e  \n\n## Credits  \n+   [Gatsby Starter Bloomer](https://github.com/zlutfi/gatsby-starter-bloomer) by [Zlutfi](https://github.com/zlutfi)  \n+   [Forward and Backward Pagination with WPGraphQL](https://www.wpgraphql.com/2020/03/26/forward-and-backward-pagination-with-wpgraphql/) by [Jason Bahl](https://github.com/jasonbahl)   \n+   [Dynamic Comments with Gatsby and WordPress](https://northstack.com/dynamic-comments-gatsby-wordpress/) by [Jeff Matson](https://github.com/JeffMatson)   \n+   [Overview - Guide to Gatsby WordPress Starter Advanced with Previews, i18n and more](https://dev.to/nevernull/basic-wordpress-gatsby-setup-guide-to-gatsby-wordpress-starter-advanced-with-previews-i18n-and-more-44d8) by [Henrick Wirth](https://github.com/henrikwirth)  \n+   [Creating a Gatsby Front-End with a WordPress CMS](https://raquelmsmith.com/blog/creating-a-gatsby-front-end-with-a-wordpress-cms/) by [Raquel Smith](https://github.com/raquelmsmith)  \n+   [Build an App Using React and the GraphQL Plugin for WordPress in ~15mins](https://www.wpgraphql.com/2019/01/10/build-an-app-using-react-and-the-graphql-plugin-for-wordpress-in-15mins/) by [Kellen Mace](https://github.com/kellenmace)  \n+   [How To Build A Blog with WordPress and Gatsby.js](https://www.gatsbyjs.com/blog/2019-04-26-how-to-build-a-blog-with-wordpress-and-gatsby-part-1/) by [Tim Smith](https://github.com/iamtimsmith)  \n## Contributors  \n[\u003cimg alt=\"vzhou842\" src=\"https://avatars3.githubusercontent.com/u/34431435?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/petejos80)|[\u003cimg alt=\"alehel\" src=\"https://avatars2.githubusercontent.com/u/32469926?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/leronamin)|\n:---: | :---: |\n| [petejos80](https://github.com/petejos80) | [leronamin](https://github.com/leronamin) |\n## License  \nThe MIT License (MIT)\n\nCopyright (c) 2016-2020 One Page Zen Systems, LLC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonepagezen%2Fob-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonepagezen%2Fob-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonepagezen%2Fob-frontend/lists"}