├── .gitignore
├── src
├── images
│ └── icon.png
└── pages
│ ├── 404.js
│ └── index.js
├── gatsby-config.js
├── README.md
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .cache/
3 | public
4 | .idea
5 |
--------------------------------------------------------------------------------
/src/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/gatsby-conf-2021/HEAD/src/images/icon.png
--------------------------------------------------------------------------------
/gatsby-config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | siteMetadata: {
3 | title: "Gatsby Conf Demo",
4 | },
5 | plugins: [
6 | `gatsby-plugin-sharp`,
7 | `gatsby-transformer-sharp`,
8 | `gatsby-plugin-image`,
9 | {
10 | resolve: "@chakra-ui/gatsby-plugin",
11 | options: {
12 | /**
13 | * @property {boolean} [isResettingCSS=true]
14 | * if false, this plugin will not use `
15 | */
16 | isResettingCSS: true,
17 | /**
18 | * @property {boolean} [isUsingColorMode=true]
19 | * if false, this plugin will not use
20 | */
21 | isUsingColorMode: true,
22 | },
23 | },
24 | ],
25 | };
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Gatsby, WordPress and WPGraphQL demo for Gatsby Conf 2021
8 |
9 |
10 | ## ℹ️ Overview
11 |
12 | This repo is an example used for the WordPress, Gatsby and WPGraphQL Workshop at GatsbyConf 2021.
13 |
14 | This repo serves as a learning resource for using Gatsby with WordPress.
15 |
16 | It will not be maintained beyond the conference.
17 |
18 | ## 📹 Gatsby Conf Video
19 |
20 | This repo will be best used as a reference to the Gatsby Conf talk which will be recorded and put on
21 | the [Gatsby YouTube Channel](https://www.youtube.com/channel/UCjnp770qk7ujOq8Q9wiC82w).
22 |
--------------------------------------------------------------------------------
/src/pages/404.js:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { Link } from "gatsby";
3 |
4 | // styles
5 | const pageStyles = {
6 | color: "#232129",
7 | padding: "96px",
8 | fontFamily: "-apple-system, Roboto, sans-serif, serif",
9 | };
10 | const headingStyles = {
11 | marginTop: 0,
12 | marginBottom: 64,
13 | maxWidth: 320,
14 | };
15 |
16 | const paragraphStyles = {
17 | marginBottom: 48,
18 | };
19 | const codeStyles = {
20 | color: "#8A6534",
21 | padding: 4,
22 | backgroundColor: "#FFF4DB",
23 | fontSize: "1.25rem",
24 | borderRadius: 4,
25 | };
26 |
27 | // markup
28 | const NotFoundPage = () => {
29 | return (
30 |
31 | Not found
32 | Page not found
33 |
34 | Sorry{" "}
35 |
36 | 😔
37 | {" "}
38 | we couldn’t find what you were looking for.
39 |
40 | {process.env.NODE_ENV === "development" ? (
41 | <>
42 |
43 | Try creating a page in src/pages/.
44 |
45 | >
46 | ) : null}
47 |
48 | Go home.
49 |
50 |
51 | );
52 | };
53 |
54 | export default NotFoundPage;
55 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby-conf-demo",
3 | "version": "1.0.0",
4 | "private": true,
5 | "description": "Gatsby Conf Demo",
6 | "author": "Jason Bahl",
7 | "keywords": [
8 | "gatsby"
9 | ],
10 | "scripts": {
11 | "develop": "gatsby develop",
12 | "start": "gatsby develop",
13 | "build": "gatsby build",
14 | "serve": "gatsby serve",
15 | "clean": "gatsby clean",
16 | "pretty": "prettier . --write"
17 | },
18 | "dependencies": {
19 | "@chakra-ui/gatsby-plugin": "^1.0.0",
20 | "@chakra-ui/icons": "^1.0.0",
21 | "@chakra-ui/react": "^1.0.0",
22 | "@emotion/is-prop-valid": "^0.8.8",
23 | "@emotion/react": "^11.0.0",
24 | "@emotion/styled": "^11.0.0",
25 | "@theme-ui/core": "^0.3.1",
26 | "@theme-ui/match-media": "^0.3.1",
27 | "@theme-ui/prism": "^0.3.0",
28 | "copy-to-clipboard": "^3.3.1",
29 | "emotion-theming": "^10.0.27",
30 | "framer-motion": "^3.7.0",
31 | "gatsby": "^2.32.3",
32 | "gatsby-plugin-image": "^0.7.2",
33 | "gatsby-plugin-react-helmet": "^3.3.14",
34 | "gatsby-plugin-sharp": "^2.8.0",
35 | "gatsby-source-wordpress": "4.0.2",
36 | "gatsby-transformer-sharp": "^2.6.0",
37 | "react": "^16.13.1",
38 | "react-dom": "^16.13.1",
39 | "react-helmet": "^5.2.1",
40 | "react-html-parser": "^2.0.2"
41 | },
42 | "devDependencies": {
43 | "husky": ">=4",
44 | "prettier": "^2.1.2"
45 | },
46 | "lint-staged": {
47 | "*.{js,ts,jsx,tsx,md,json,yml,css}": "prettier --write"
48 | },
49 | "husky": {
50 | "hooks": {
51 | "pre-commit": "lint-staged"
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/pages/index.js:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | // styles
4 | const pageStyles = {
5 | color: "#232129",
6 | padding: "96px",
7 | fontFamily: "-apple-system, Roboto, sans-serif, serif",
8 | };
9 | const headingStyles = {
10 | marginTop: 0,
11 | marginBottom: 64,
12 | maxWidth: 320,
13 | };
14 | const headingAccentStyles = {
15 | color: "#663399",
16 | };
17 | const paragraphStyles = {
18 | marginBottom: 48,
19 | };
20 | const codeStyles = {
21 | color: "#8A6534",
22 | padding: 4,
23 | backgroundColor: "#FFF4DB",
24 | fontSize: "1.25rem",
25 | borderRadius: 4,
26 | };
27 | const listStyles = {
28 | marginBottom: 96,
29 | paddingLeft: 0,
30 | };
31 | const listItemStyles = {
32 | fontWeight: "300",
33 | fontSize: "24px",
34 | maxWidth: "560px",
35 | };
36 |
37 | const linkStyle = {
38 | color: "#8954A8",
39 | fontWeight: "bold",
40 | fontSize: "16px",
41 | verticalAlign: "5%",
42 | };
43 |
44 | const docLinkStyle = {
45 | ...linkStyle,
46 | listStyleType: "none",
47 | marginBottom: 24,
48 | };
49 |
50 | const descriptionStyle = {
51 | color: "#232129",
52 | fontSize: "14px",
53 | };
54 |
55 | const docLink = {
56 | text: "Documentation",
57 | url: "https://www.gatsbyjs.com/docs/",
58 | color: "#8954A8",
59 | };
60 | // data
61 | const links = [
62 | {
63 | text: "Tutorial",
64 | url: "https://www.gatsbyjs.com/docs/tutorial/",
65 | description:
66 | "A great place to get started if you're new to web development. Designed to guide you through setting up your first Gatsby site.",
67 | color: "#E95800",
68 | },
69 | {
70 | text: "How to Guides",
71 | url: "https://www.gatsbyjs.com/docs/how-to/",
72 | description:
73 | "Practical step-by-step guides to help you achieve a specific goal. Most useful when you're trying to get something done.",
74 | color: "#1099A8",
75 | },
76 | {
77 | text: "Reference Guides",
78 | url: "https://www.gatsbyjs.com/docs/reference/",
79 | description:
80 | "Nitty-gritty technical descriptions of how Gatsby works. Most useful when you need detailed information about Gatsby's APIs.",
81 | color: "#BC027F",
82 | },
83 | {
84 | text: "Conceptual Guides",
85 | url: "https://www.gatsbyjs.com/docs/conceptual/",
86 | description:
87 | "Big-picture explanations of higher-level Gatsby concepts. Most useful for building understanding of a particular topic.",
88 | color: "#0D96F2",
89 | },
90 | {
91 | text: "Plugin Library",
92 | url: "https://www.gatsbyjs.com/plugins",
93 | description:
94 | "Add functionality and customize your Gatsby site or app with thousands of plugins built by our amazing developer community.",
95 | color: "#000000",
96 | },
97 | ];
98 |
99 | // markup
100 | const IndexPage = () => {
101 | return (
102 |
103 | Home Page
104 |
105 | Congratulations
106 |
107 | — you just made a Gatsby site!
108 |
109 | 🎉🎉🎉
110 |
111 |
112 |
113 | Edit src/pages/index.js to see this page
114 | update in real-time.{" "}
115 |
116 | 😎
117 |
118 |
119 |
142 |
146 |
147 | );
148 | };
149 |
150 | export default IndexPage;
151 |
--------------------------------------------------------------------------------