Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into lost-pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
john-kurkowski committed Apr 3, 2024
2 parents c032cb5 + dc6c6c5 commit d0be1a1
Show file tree
Hide file tree
Showing 38 changed files with 4,829 additions and 6,798 deletions.
27 changes: 11 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended'
'plugin:react/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'jsx-a11y', 'react'],
root: true,
rules: {
'no-console': 'error',
'react/no-unescaped-entities': [
'error',
{
forbid: ['>', '}']
}
]
forbid: ['>', '}'],
},
],
},
settings: {
react: {
version: 'detect'
}
}
version: 'detect',
},
},
}
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
npm test
npx lint-staged
npm run type-check
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"jsxSingleQuote": true,
"proseWrap": "always",
"semi": false,
"singleQuote": true
}
18 changes: 12 additions & 6 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
{
"extends": "stylelint-config-standard",
"rules": {
"at-rule-no-unknown": [true, {
"ignoreAtRules": [
"screen",
"tailwind"
]
}]
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["screen", "tailwind"]
}
],
"function-no-unknown": [
true,
{
"ignoreFunctions": ["theme"]
}
]
}
}
42 changes: 20 additions & 22 deletions gatsby-config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
description: 'UX Engineering Consultant',
siteUrl: 'https://johnkurkowski.com',
title: 'John Kurkowski',
url: 'https://johnkurkowski.com'
url: 'https://johnkurkowski.com',
},
plugins: [
{
Expand Down Expand Up @@ -39,41 +39,39 @@ export default {
}
}
`,
serialize ({ query: { site, allMdx } }) {
return allMdx.edges.map(edge => {
serialize({ query: { site, allMdx } }) {
return allMdx.edges.map((edge) => {
return Object.assign({}, edge.node.frontmatter, {
description: edge.node.excerpt,
date: edge.node.fields.date,
url: site.siteMetadata.siteUrl + edge.node.fields.slug,
guid: site.siteMetadata.siteUrl + edge.node.fields.slug,
custom_elements: [{ 'content:encoded': edge.node.excerpt }]
custom_elements: [{ 'content:encoded': edge.node.excerpt }],
})
})
},
title: 'John Kurkowski'
}
]
}
title: 'John Kurkowski',
},
],
},
},
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: ['G-0DLDSD2HD9']
}
trackingIds: ['G-0DLDSD2HD9'],
},
},
`gatsby-plugin-postcss`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-react-svg`,
`gatsby-plugin-robots-txt`,
`gatsby-plugin-root-import`,
`gatsby-plugin-sitemap`,
`gatsby-plugin-typescript`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${dirname(fileURLToPath(import.meta.url))}/src/content/`
}
path: `${dirname(fileURLToPath(import.meta.url))}/src/content/`,
},
},
{
resolve: `gatsby-plugin-mdx`,
Expand All @@ -84,16 +82,16 @@ export default {
{
resolve: `gatsby-remark-copy-linked-files`,
options: {
ignoreFileExtensions: []
}
ignoreFileExtensions: [],
},
},
`gatsby-remark-prismjs`,
`gatsby-remark-smartypants`
`gatsby-remark-smartypants`,
],
mdxOptions: {
remarkPlugins: [remarkGfm]
}
}
}
]
remarkPlugins: [remarkGfm],
},
},
},
],
}
14 changes: 7 additions & 7 deletions gatsby-node.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import path from 'path'
import { createFilePath } from 'gatsby-source-filesystem'

export function onCreateNode ({ node, getNode, actions }) {
export function onCreateNode({ node, getNode, actions }) {
const { createNodeField } = actions
if (node.internal.type === `Mdx`) {
const parent = getNode(node.parent)
createNodeField({
node,
name: `collection`,
value: parent.sourceInstanceName
value: parent.sourceInstanceName,
})

const slug = createFilePath({ node, getNode })
Expand All @@ -20,7 +20,7 @@ export function onCreateNode ({ node, getNode, actions }) {
createNodeField({
node,
name: `date`,
value: `${date}T00:00:00.0000-08:00`
value: `${date}T00:00:00.0000-08:00`,
})
createNodeField({ node, name: `slug`, value: `/posts/${title}/` })
} else {
Expand All @@ -29,7 +29,7 @@ export function onCreateNode ({ node, getNode, actions }) {
}
}

export async function createPages ({ graphql, actions }) {
export async function createPages({ graphql, actions }) {
const { createPage } = actions
const result = await graphql(`
query {
Expand Down Expand Up @@ -57,12 +57,12 @@ export async function createPages ({ graphql, actions }) {
component: path.resolve(
`./src/components/layouts/${
isPost ? 'post' : 'page'
}.jsx?__contentFilePath=${node.internal.contentFilePath}`
}.jsx?__contentFilePath=${node.internal.contentFilePath}`,
),
context: {
date: node.fields.date,
slug: node.fields.slug
}
slug: node.fields.slug,
},
})
})
}
62 changes: 62 additions & 0 deletions gatsby-ssr.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import React from 'react'

import { RenderBodyArgs } from 'gatsby'

export const onRenderBody = (args: RenderBodyArgs) => {
args.setHtmlAttributes({
className: 'bg-secondary',
})

args.setHeadComponents([
<meta
content='John'
key='profile:first_name'
property='profile:first_name'
/>,
<meta
content='Kurkowski'
key='profile:last_name'
property='profile:last_name'
/>,

<meta
content='width=device-width, initial-scale=1.0, viewport-fit=cover'
key='viewport'
name='viewport'
/>,

<link
crossOrigin='anonymous'
href='https://fonts.gstatic.com/'
key='preconnect'
rel='preconnect'
/>,
<link
as='style'
href='https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400;1,700&family=Open+Sans:wght@400;600;700;800'
key='preload'
rel='preload'
/>,
<link
href='https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400;1,700&family=Open+Sans:wght@400;600;700;800'
key='stylesheet'
rel='stylesheet'
/>,

<link key='shortcut icon' href='/favicon.ico' rel='shortcut icon' />,
<link
key='apple-touch-icon'
href='/avatar@2X.jpeg'
rel='apple-touch-icon'
/>,
<meta content='/avatar@2X.jpeg' key='og:image' property='og:image' />,
<meta
content='/avatar@2X.jpeg'
key='twitter:image:src'
name='twitter:image:src'
/>,
<meta content='summary' key='twitter:card' name='twitter:card' />,
<meta content='@bluu' key='twitter:site' name='twitter:site' />,
<meta content='@bluu' key='twitter:creator' name='twitter:creator' />,
])
}
Loading

0 comments on commit d0be1a1

Please sign in to comment.