Skip to content

Commit

Permalink
fix fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
thedaviddias committed Jul 28, 2022
1 parent 0653f5b commit 171ebc2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const routes: RoutesResponse = (translate) => ({
path: '/blog',
seo: extendSEO({
title: 'Blog',
description: 'Articles about my passions (including web development and leadership).',
description:
'Articles about my web development and anything that piques my curiosity and interest.',
image: 'images/og/blog.png',
url: 'blog',
}),
Expand Down
10 changes: 5 additions & 5 deletions src/config/seo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NextSeoProps } from 'next-seo'

export const baseUrl = process.env.VERCEL_URL || 'http://localhost:3000'
export const baseUrl = 'http://localhost:3000' || process.env.VERCEL_URL
export const baseEmail = 'hello@thedaviddias.com'

const title = 'The David Dias | Developer and content creator'
Expand Down Expand Up @@ -85,28 +85,28 @@ export const defaultSEO: NextSeoProps = {
href: `${baseUrl}/favicons/favicon-16x16.png`,
},
{
rel: 'preload',
rel: 'prefetch',
href: `${baseUrl}/fonts/oswald.woff2`,
as: 'font',
type: 'font/woff2',
crossOrigin: 'anonymous',
},
{
rel: 'preload',
rel: 'prefetch',
href: `${baseUrl}/fonts/SourceSansPro-Light.woff2`,
as: 'font',
type: 'font/woff2',
crossOrigin: 'anonymous',
},
{
rel: 'preload',
rel: 'prefetch',
href: `${baseUrl}/fonts/SourceSansPro-Regular.woff2`,
as: 'font',
type: 'font/woff2',
crossOrigin: 'anonymous',
},
{
rel: 'preload',
rel: 'prefetch',
href: `${baseUrl}/fonts/SourceSansPro-Bold.woff2`,
as: 'font',
type: 'font/woff2',
Expand Down
22 changes: 20 additions & 2 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"headers": [
{
"source": "/fonts/ibm-plex-sans-var.woff2",
"source": "/fonts/oswald.woff2",
"headers": [
{
"key": "Cache-Control",
Expand All @@ -10,7 +10,25 @@
]
},
{
"source": "/fonts/ibm-plex-sans-var-italic.woff2",
"source": "/fonts/SourceSansPro-Light.woff2",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
},
{
"source": "/fonts/SourceSansPro-Regular.woff2",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
},
{
"source": "/fonts/SourceSansPro-Bold.woff2",
"headers": [
{
"key": "Cache-Control",
Expand Down

2 comments on commit 171ebc2

@vercel
Copy link

@vercel vercel bot commented on 171ebc2 Jul 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for thedaviddias-blog ready!

✅ Preview
https://thedaviddias-blog-2ejn81uxe-thedaviddias1.vercel.app

Built with commit 171ebc2.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.