Skip to content

137 improve site performance #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 60 additions & 52 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type { GatsbyConfig } from 'gatsby';
import {
getSiteMetadata,
getSocialImageGenerationConfigDefaults,
getSocialImageGenerationConfigForType,
getTheme,
} from './src/common/config-manager';
import { SOCIAL_IMAGES_DIR } from './src/common/constants';
Expand All @@ -16,6 +17,7 @@ import tailwindConfig from './tailwind.config';

const SITE_METADATA = getSiteMetadata();
const DARK_THEME = getTheme('dark');
const OG_IMAGE_GENERATION_CONFIG = getSocialImageGenerationConfigForType('og');

// Load environment variables from relevant .env file
dotenv.config({
Expand Down Expand Up @@ -47,8 +49,6 @@ const config: GatsbyConfig = {
{
resolve: 'gatsby-plugin-purgecss',
options: {
// printRejected: true,
// printAll: true,
tailwind: true,
purgeCSSOptions: {
safelist: [/where/],
Expand Down Expand Up @@ -85,6 +85,7 @@ const config: GatsbyConfig = {
resolve: 'gatsby-plugin-manifest',
options: {
name: SITE_METADATA.title,
description: SITE_METADATA.description,
// biome-ignore lint/style/useNamingConvention: Naming convention is enforced by the plugin
short_name: SITE_METADATA.shortTitle,
// biome-ignore lint/style/useNamingConvention: Naming convention is enforced by the plugin
Expand All @@ -95,6 +96,13 @@ const config: GatsbyConfig = {
theme_color: DARK_THEME.primary,
display: 'standalone',
icon: `${__dirname}/src/${SITE_METADATA.iconPath}`,
screenshots: [
{
src: 'images/og/index.webp',
sizes: `${OG_IMAGE_GENERATION_CONFIG.size.width}x${OG_IMAGE_GENERATION_CONFIG.size.height}`,
type: 'image/webp',
},
],
crossOrigin: 'use-credentials',
},
},
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@tsparticles/shape-square": "^3.4.0",
"daisyui": "^4.12.2",
"dotenv": "^16.4.5",
"framer-motion": "^11.2.10",
"framer-motion": "^11.2.11",
"gatsby": "^5.13.6",
"gatsby-plugin-component-to-image": "^1.0.1",
"gatsby-plugin-manifest": "^5.13.1",
Expand All @@ -68,15 +68,15 @@
"react-hook-form": "^7.52.0"
},
"devDependencies": {
"@biomejs/biome": "1.8.1",
"@biomejs/biome": "1.8.2",
"@types/jsdom": "^21.1.7",
"@types/node": "^20.14.2",
"@types/node": "^20.14.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"typescript": "^5.4.5"
"typescript": "^5.5.2"
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion src/common/config-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function getSiteMetadata(): SiteMetadata {
title: `${authorFullName} | ${config.author.jobTitle}`,
tagline: `${config.author.jobTitle} & Cat Whisperer`,
shortDescription: `Portfolio site for ${authorFullName}`,
description: `Portfolio site for ${authorFullName}, a ${config.author.jobTitle} based in ${config.author.location.city}, ${config.author.location.state}.`,
description: `Portfolio site for ${authorFullName}, a ${config.author.jobTitle.toLowerCase()} based in ${config.author.location.city}, ${config.author.location.state}.`,
iconPath: config.iconPath,
siteUrl: config.siteUrl,
sourceUrl: config.sourceUrl,
Expand Down
Loading
Loading