{"id":13725392,"url":"https://github.com/apollographql/blog","last_synced_at":"2025-05-07T20:32:15.259Z","repository":{"id":37108835,"uuid":"236815135","full_name":"apollographql/blog","owner":"apollographql","description":"📝  Blog website built with Wordpress and Gatsby","archived":true,"fork":false,"pushed_at":"2023-12-06T13:15:09.000Z","size":4803,"stargazers_count":68,"open_issues_count":12,"forks_count":18,"subscribers_count":24,"default_branch":"main","last_synced_at":"2024-08-04T01:27:42.576Z","etag":null,"topics":["blog","gatsby","static-site","wordpress"],"latest_commit_sha":null,"homepage":"https://www.apollographql.com/blog","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/apollographql.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2020-01-28T18:59:38.000Z","updated_at":"2024-05-21T04:55:58.000Z","dependencies_parsed_at":"2023-02-08T12:16:35.826Z","dependency_job_id":"6da6f97e-6c98-48ad-8238-a0f734fbea94","html_url":"https://github.com/apollographql/blog","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/apollographql%2Fblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apollographql","download_url":"https://codeload.github.com/apollographql/blog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224645358,"owners_count":17346131,"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","gatsby","static-site","wordpress"],"created_at":"2024-08-03T01:02:21.587Z","updated_at":"2024-11-14T15:31:15.632Z","avatar_url":"https://github.com/apollographql.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Apollo Blog\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/6bae8279-10f9-456b-82cd-0b6d56a84042/deploy-status)](https://app.netlify.com/sites/apollographql-blog/deploys)\n\nThis website is a static [Gatsby](https://gatsbyjs.org) website, created using data served from a Wordpress instance running on [WP Engine](https://wpengine.com/). It is built and deployed on Netlify, and leverages the [NetlifyPress](https://wordpress.org/plugins/deploy-netlifypress/) Wordpress plugin to trigger new deploys when content is created or updated.\n\n- [Custom components](#custom-components)\n  - [Quote share button](#quote-share-button)\n  - [Show/hide groups of elements](#showhide-groups-of-elements)\n- [Running Wordpress locally](#running-wordpress-locally)\n- [Local development](#local-development)\n- [Diagnosing site failures](#diagnosing-site-failures)\n  - [Netlify](#netlify)\n  - [WP Engine](#wp-engine)\n\n## Custom components\n\nIn this blog, we use some Wordpress features in creative ways to deliver custom functionality in our posts.\n\n### Quote share button\n\nWordpress _Quote_ and _Pullquote_ block types both get the same visual treatment, with one key difference: the \"Tweet\" button. To add a button prompting users to share the blockquote on Twitter, simply use the _Pullquote_ block type in Wordpress, rather than the default _Quote_ type.\n\n### Show/hide groups of elements\n\nWe transform Wordpress _Group_ blocks into [HTML `\u003cdetails\u003e` elements](https://developer.mozilla.org/en/docs/Web/HTML/Element/details), allowing for progressive disclosure of complicated examples using native HTML.\n\nBy default, `\u003cdetails\u003e` elements have a summary message that reads \"Details\", but authors can override this message by supplying their own `\u003csummary\u003e` element as the first child within a _Group_ block in Wordpress.\n\n```html\n\u003csummary\u003eExpand for more details\u003c/summary\u003e\n```\n\n## Running Wordpress locally\n\nTo run Wordpress on your local machine, we use [Local](https://localwp.com/), an application that lets you start and stop local Wordpress instances, and push/pull data between your machine and our hosting provider.\n\n[Follow this guide](https://wpengine.com/support/local/) to install Local on your machine, connect to our WP Engine account, and pull the `apollographql` site.\n\nBy default, Local uses it's own routing solution to serve Wordpress instances at the `.local` TLD. To run this site locally, you'll need to disable this feature by going into Preferences \u003e Advanced \u003e Router Mode, and selecting \"localhost\" from the dropdown.\n\nOnce you have a local copy of our Wordpress instance up and running, you're ready to start the Gatsby local development environment...\n\n## Local development\n\nThis project requires the [Netlify CLI](https://docs.netlify.com/cli/get-started/) to run locally. We use Netlify to store the site's environment variables and run its serverless functions locally. If you don't already have it installed, install the Netlify CLI globally.\n\nRun `netlify init` and select the default answers to each of the following prompts to connect your local site to our project on Netlify.\n\n```bash\nnpm install -g netlify-cli\nnetlify init\n```\n\nNext, install the project's dependencies.\n\n```bash\nnpm install\n```\n\nFinally, start your development environment. Take note of the \"Site Host\" value in your Local app. You'll need to supply this to the following call in the form of a `WORDPRESS_URL_DEV` environment variable. For instance, if your \"Site Host\" is localhost:10003, you can run the following command in your terminal:\n\n```bash\nWORDPRESS_URL_DEV=localhost:10003 netlify dev\n```\n\nNow, you should have a development server running at http://localhost:8888! 🚀\n\n## Diagnosing site failures\n\nIn the event of an outage, one might want to check on the status of services that this site depends on. This site has two main 3rd-party points of failure:\n\n### Netlify\n\n[Status page](https://www.netlifystatus.com/)\n\nWe use Netlify to build and host the static Gatsby site portion of this website. Site settings can be configured [on Netlify](https://app.netlify.com/sites/apollographql-blog/overview).\n\n\u003e **Note:** If a new deploy fails to build on Netlify, it won't have an effect on the site currently in production. Netlify will only deploy successful builds.\n\nWe also leverage Netlify redirects to proxy requests from `/blog` to our Netlify deployment. This redirect rule that does this [can be found here](https://github.com/apollographql/website-router/blob/master/_redirects#L50).\n\n### WP Engine\n\n[Status page](https://wpenginestatus.com/)\n\nThe Wordpress component of this website is hosted by WP Engine. They are a service that specializes in secure Wordpress hosting.\n\nOne can [log in to WP Engine](https://identity.wpengine.com/) using the login credentials found in 1Password. Once you're in there, you can do things like:\n\n- Change our hosting configuration\n- Update server software\n- View server access/error logs\n- Inspect/administrate the database using phpMyAdmin\n- Roll back the entire site to a previous daily backup\n- Contact WP Engine support\n\nIn case of a malware infection, WP Engine offers support for diagnosing and removing malware, excluding some circumstances. More information on this topic and their protocols can be found in [this article from their website](https://wpengine.com/support/malware-scans-cleaning/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollographql%2Fblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapollographql%2Fblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollographql%2Fblog/lists"}