Skip to content

Commit d68ba27

Browse files
Merge remote-tracking branch 'origin/master' into lost-pixel
2 parents e50ec0a + de91b4d commit d68ba27

29 files changed

+18726
-47851
lines changed

.github/workflows/vrt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Node
1313
uses: actions/setup-node@v4
1414
with:
15-
node-version: 16.14.2
15+
node-version: 20.12.0
1616

1717
- name: Install dependencies
1818
run: npm install

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm test

gatsby-config.js renamed to gatsby-config.mjs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
module.exports = {
1+
import { dirname } from 'path'
2+
import { fileURLToPath } from 'url'
3+
import remarkGfm from 'remark-gfm'
4+
5+
export default {
26
siteMetadata: {
37
description: 'UX Engineering Consultant',
48
siteUrl: 'https://johnkurkowski.com',
@@ -16,7 +20,7 @@ module.exports = {
1620
{
1721
allMdx(
1822
filter: { fields: { date: { ne: null } } }
19-
sort: { fields: [fields___date], order: DESC }
23+
sort: { fields: { date: DESC } }
2024
) {
2125
edges {
2226
node {
@@ -29,7 +33,6 @@ module.exports = {
2933
description
3034
title
3135
}
32-
html
3336
id
3437
}
3538
}
@@ -43,10 +46,11 @@ module.exports = {
4346
date: edge.node.fields.date,
4447
url: site.siteMetadata.siteUrl + edge.node.fields.slug,
4548
guid: site.siteMetadata.siteUrl + edge.node.fields.slug,
46-
custom_elements: [{ 'content:encoded': edge.node.html }]
49+
custom_elements: [{ 'content:encoded': edge.node.excerpt }]
4750
})
4851
})
49-
}
52+
},
53+
title: 'John Kurkowski'
5054
}
5155
]
5256
}
@@ -68,7 +72,7 @@ module.exports = {
6872
resolve: `gatsby-source-filesystem`,
6973
options: {
7074
name: `pages`,
71-
path: `${__dirname}/src/content/`
75+
path: `${dirname(fileURLToPath(import.meta.url))}/src/content/`
7276
}
7377
},
7478
{
@@ -77,13 +81,6 @@ module.exports = {
7781
extensions: [`.md`, `.mdx`],
7882
gatsbyRemarkPlugins: [
7983
`gatsby-plugin-catch-links`,
80-
{
81-
resolve: `gatsby-remark-autolink-headers`,
82-
options: {
83-
enableCustomId: true,
84-
isIconAfterHeader: true
85-
}
86-
},
8784
{
8885
resolve: `gatsby-remark-copy-linked-files`,
8986
options: {
@@ -93,7 +90,9 @@ module.exports = {
9390
`gatsby-remark-prismjs`,
9491
`gatsby-remark-smartypants`
9592
],
96-
plugins: [`gatsby-remark-autolink-headers`]
93+
mdxOptions: {
94+
remarkPlugins: [remarkGfm]
95+
}
9796
}
9897
}
9998
]

gatsby-node.js renamed to gatsby-node.mjs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
2-
const path = require('path')
3-
const { createFilePath } = require(`gatsby-source-filesystem`)
1+
import path from 'path'
2+
import { createFilePath } from 'gatsby-source-filesystem'
43

5-
exports.onCreateNode = ({ node, getNode, actions }) => {
4+
export function onCreateNode ({ node, getNode, actions }) {
65
const { createNodeField } = actions
76
if (node.internal.type === `Mdx`) {
87
const parent = getNode(node.parent)
@@ -30,7 +29,7 @@ exports.onCreateNode = ({ node, getNode, actions }) => {
3029
}
3130
}
3231

33-
exports.createPages = async ({ graphql, actions }) => {
32+
export async function createPages ({ graphql, actions }) {
3433
const { createPage } = actions
3534
const result = await graphql(`
3635
query {
@@ -41,6 +40,9 @@ exports.createPages = async ({ graphql, actions }) => {
4140
date
4241
slug
4342
}
43+
internal {
44+
contentFilePath
45+
}
4446
}
4547
}
4648
}
@@ -53,7 +55,9 @@ exports.createPages = async ({ graphql, actions }) => {
5355
createPage({
5456
path: node.fields.slug,
5557
component: path.resolve(
56-
`./src/components/layouts/${isPost ? 'post' : 'page'}.tsx`
58+
`./src/components/layouts/${
59+
isPost ? 'post' : 'page'
60+
}.jsx?__contentFilePath=${node.internal.contentFilePath}`
5761
),
5862
context: {
5963
date: node.fields.date,

netlify.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
publish = "public/"
44

55
[build.environment]
6-
NODE_VERSION = "16.14.2"
7-
NPM_VERSION = "8.6.0"
6+
NODE_VERSION = "20.12.0"
7+
NPM_VERSION = "10.5.0"

0 commit comments

Comments
 (0)