Skip to content

Commit 1d7d91c

Browse files
committed
wip: JWT blog post
1 parent 730cfb9 commit 1d7d91c

File tree

251 files changed

+19125
-18375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+19125
-18375
lines changed

.prettierrc.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
module.exports = {
22
printWidth: 100,
33
tabWidth: 2,
4+
singleQuote: false,
5+
trailingComma: "all",
46
overrides: [
57
{
68
files: "*.js",
79
options: {
8-
tabWidth: 4
9-
}
10-
}
11-
]
10+
tabWidth: 4,
11+
},
12+
},
13+
],
1214
};

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
# gatsby-starter-default
2+
23
The default Gatsby starter.
34

45
For an overview of the project structure please refer to the [Gatsby documentation - Building with Components](https://www.gatsbyjs.org/docs/building-with-components/).
56

67
## Install
78

89
Make sure that you have the Gatsby CLI program installed:
10+
911
```sh
1012
npm install --global gatsby-cli
1113
```
1214

1315
And run from your CLI:
16+
1417
```sh
1518
gatsby new gatsby-example-site
1619
```
1720

1821
Then you can run it by:
22+
1923
```sh
2024
cd gatsby-example-site
2125
gatsby develop

gatsby-browser.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
// You can delete this file if you're not using it
88

9-
exports.onRouteUpdate = ({location, prevLocation}) => {
10-
if (window.posthog) {
11-
window.posthog.capture ('$pageview');
12-
}
9+
exports.onRouteUpdate = ({ location, prevLocation }) => {
10+
if (window.posthog) {
11+
window.posthog.capture("$pageview");
12+
}
1313
};

gatsby-config.js

Lines changed: 98 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,109 @@
11
module.exports = {
2-
siteMetadata: {
3-
title: 'Webiny',
4-
},
5-
plugins: [
6-
'gatsby-plugin-react-helmet',
7-
'gatsby-plugin-sharp',
8-
'gatsby-transformer-sharp',
9-
{
10-
resolve: 'gatsby-plugin-google-fonts',
11-
options: {
12-
fonts: [
13-
'source sans pro:300,400,500,600,700',
14-
'source code pro:400,700',
15-
'open sans:300,400,600,700',
16-
],
17-
},
2+
siteMetadata: {
3+
title: "Webiny",
184
},
19-
{
20-
resolve: 'gatsby-plugin-emotion',
21-
options: {
22-
sourceMap: true,
23-
autoLabel: true,
24-
},
25-
},
26-
{
27-
resolve: 'gatsby-plugin-google-marketing-platform',
28-
options: {
29-
dataLayer: {
30-
// Preset dataLayer values
31-
gaPropertyId: 'UA-35527198-1',
5+
plugins: [
6+
"gatsby-plugin-react-helmet",
7+
"gatsby-plugin-sharp",
8+
"gatsby-transformer-sharp",
9+
{
10+
resolve: "gatsby-plugin-google-fonts",
11+
options: {
12+
fonts: [
13+
"source sans pro:300,400,500,600,700",
14+
"source code pro:400,700",
15+
"open sans:300,400,600,700",
16+
],
17+
},
3218
},
33-
analytics: {
34-
id: 'UA-35527198-1',
19+
{
20+
resolve: "gatsby-plugin-emotion",
21+
options: {
22+
sourceMap: true,
23+
autoLabel: true,
24+
},
3525
},
36-
optimize: {
37-
id: 'GTM-NJG8KQL',
38-
timeout: 1000,
39-
activateOn: 'observer',
26+
{
27+
resolve: "gatsby-plugin-google-marketing-platform",
28+
options: {
29+
dataLayer: {
30+
// Preset dataLayer values
31+
gaPropertyId: "UA-35527198-1",
32+
},
33+
analytics: {
34+
id: "UA-35527198-1",
35+
},
36+
optimize: {
37+
id: "GTM-NJG8KQL",
38+
timeout: 1000,
39+
activateOn: "observer",
40+
},
41+
},
4042
},
41-
},
42-
},
43-
{
44-
resolve: 'gatsby-plugin-facebook-pixel',
45-
options: {
46-
pixelId: '581721448994639',
47-
},
48-
},
49-
{
50-
resolve: `gatsby-plugin-twitter-pixel`,
51-
options: {
52-
pixelId: 'o4gd9',
53-
},
54-
},
55-
{
56-
resolve: 'gatsby-plugin-hotjar-tracking',
57-
options: {
58-
includeInDevelopment: false,
59-
id: 637057,
60-
sv: 6,
61-
},
62-
},
63-
{
64-
resolve: 'gatsby-plugin-react-svg',
65-
options: {
66-
rule: {
67-
include: /\.inline\.svg$/,
43+
{
44+
resolve: "gatsby-plugin-facebook-pixel",
45+
options: {
46+
pixelId: "581721448994639",
47+
},
6848
},
69-
},
70-
},
71-
{
72-
resolve: 'gatsby-source-filesystem',
73-
options: {
74-
path: `${__dirname}/src/blogPosts`,
75-
},
76-
},
77-
{
78-
resolve: `gatsby-transformer-remark`,
79-
options: {
80-
plugins: [
81-
{
82-
resolve: `gatsby-remark-images`,
49+
{
50+
resolve: `gatsby-plugin-twitter-pixel`,
8351
options: {
84-
maxWidth: 800,
52+
pixelId: "o4gd9",
8553
},
86-
},
87-
{
88-
resolve: `gatsby-remark-copy-linked-files`,
54+
},
55+
{
56+
resolve: "gatsby-plugin-hotjar-tracking",
8957
options: {
90-
ignoreFileExtensions: [`png`, `jpg`, `jpeg`, `bmp`, `tiff`],
58+
includeInDevelopment: false,
59+
id: 637057,
60+
sv: 6,
9161
},
92-
},
93-
{
94-
resolve: 'gatsby-remark-embed-gist',
95-
},
96-
{
97-
resolve: '@weknow/gatsby-remark-twitter',
98-
},
99-
],
100-
},
101-
},
102-
],
62+
},
63+
{
64+
resolve: "gatsby-plugin-react-svg",
65+
options: {
66+
rule: {
67+
include: /\.inline\.svg$/,
68+
},
69+
},
70+
},
71+
{
72+
resolve: "gatsby-source-filesystem",
73+
options: {
74+
path: `${__dirname}/src/blogPosts`
75+
},
76+
},
77+
{
78+
resolve: `gatsby-plugin-mdx`,
79+
options: {
80+
extensions: [`.mdx`]
81+
},
82+
},
83+
{
84+
resolve: `gatsby-transformer-remark`,
85+
options: {
86+
plugins: [
87+
{
88+
resolve: `gatsby-remark-images`,
89+
options: {
90+
maxWidth: 800,
91+
},
92+
},
93+
{
94+
resolve: `gatsby-remark-copy-linked-files`,
95+
options: {
96+
ignoreFileExtensions: [`png`, `jpg`, `jpeg`, `bmp`, `tiff`],
97+
},
98+
},
99+
{
100+
resolve: "gatsby-remark-embed-gist",
101+
},
102+
{
103+
resolve: "@weknow/gatsby-remark-twitter",
104+
},
105+
],
106+
},
107+
},
108+
],
103109
};

gatsby-node.js

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,40 @@
55
*/
66

77
// You can delete this file if you're not using it
8-
exports.createPages = async ({actions, graphql, reporter}) => {
9-
const {createPage} = actions;
8+
exports.createPages = async ({ actions, graphql, reporter }) => {
9+
const { createPage } = actions;
1010

11-
const blogPostTemplate = require.resolve (
12-
`./src/components/blog/blogTemplate.js`
13-
);
11+
const blogPostTemplate = require.resolve(`./src/components/blog/blogTemplate.js`);
1412

15-
const result = await graphql (`
16-
{
17-
allMarkdownRemark(
18-
limit: 1000
19-
) {
20-
edges {
21-
node {
22-
frontmatter {
23-
slug
24-
}
13+
const result = await graphql(`
14+
{
15+
allMdx {
16+
edges {
17+
node {
18+
frontmatter {
19+
slug
20+
}
21+
}
22+
}
2523
}
26-
}
2724
}
28-
}
2925
`);
3026

31-
// Handle errors
32-
if (result.errors) {
33-
reporter.panicOnBuild (`Error while running GraphQL query.`);
34-
console.log (result);
35-
return;
36-
}
27+
// Handle errors
28+
if (result.errors) {
29+
reporter.panicOnBuild(`Error while running GraphQL query.`);
30+
console.log(result);
31+
return;
32+
}
3733

38-
result.data.allMarkdownRemark.edges.forEach (({node}) => {
39-
createPage ({
40-
path: node.frontmatter.slug,
41-
component: blogPostTemplate,
42-
context: {
43-
// additional data can be passed via context
44-
slug: node.frontmatter.slug,
45-
},
34+
result.data.allMdx.edges.forEach(({ node }) => {
35+
createPage({
36+
path: node.frontmatter.slug,
37+
component: blogPostTemplate,
38+
context: {
39+
// additional data can be passed via context
40+
slug: node.frontmatter.slug,
41+
},
42+
});
4643
});
47-
});
4844
};

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"version": "1.0.0",
55
"author": "Kyle Mathews <[email protected]>",
66
"dependencies": {
7+
"@mdx-js/mdx": "^1.6.18",
8+
"@mdx-js/react": "^1.6.18",
79
"@weknow/gatsby-remark-twitter": "^0.2.3",
810
"aos": "^2.3.4",
911
"babel-plugin-emotion": "^9.2.3",
@@ -16,12 +18,14 @@
1618
"gatsby": "^2.0.0",
1719
"gatsby-image": "^2.4.18",
1820
"gatsby-link": "^2",
21+
"gatsby-mdx-fix": "^0.0.3",
1922
"gatsby-plugin-emotion": "^2",
2023
"gatsby-plugin-facebook-pixel": "^1.0.3",
2124
"gatsby-plugin-google-analytics": "^2.0.17",
2225
"gatsby-plugin-google-fonts": "0.0.4",
2326
"gatsby-plugin-google-marketing-platform": "^0.1.20",
2427
"gatsby-plugin-hotjar-tracking": "^1.0.0",
28+
"gatsby-plugin-mdx": "^1.2.40",
2529
"gatsby-plugin-offline": "^2.2.7",
2630
"gatsby-plugin-react-helmet": "^3",
2731
"gatsby-plugin-react-svg": "^3.0.0",
@@ -61,7 +65,7 @@
6165
"scripts": {
6266
"build": "gatsby build",
6367
"develop": "gatsby develop",
64-
"format": "prettier --write 'src/**/*.js'",
68+
"format": "prettier --write \"**/**/*.{js,jsx,ts,tsx,md}\" --config .prettierrc.js",
6569
"test": "echo \"Error: no test specified\" && exit 1"
6670
},
6771
"devDependencies": {

0 commit comments

Comments
 (0)