mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
Cleanup layout static SEO.
This commit is contained in:
parent
285336624a
commit
c9e16283e7
2 changed files with 13 additions and 10 deletions
|
|
@ -32,8 +32,18 @@
|
||||||
titleTemplate: '%s | Bradley Shellnut',
|
titleTemplate: '%s | Bradley Shellnut',
|
||||||
openGraph: {
|
openGraph: {
|
||||||
type: 'website',
|
type: 'website',
|
||||||
titleTemplate: '%s | Bradley Shellnut',
|
|
||||||
locale: 'en_US',
|
locale: 'en_US',
|
||||||
|
images: [
|
||||||
|
{
|
||||||
|
url: `${$page.data.baseUrl}b_shell_nut_favicon.gif`,
|
||||||
|
alt: 'Bradley Shellnut Website Logo'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
card: 'summary_large_image',
|
||||||
|
image: `${$page.data.baseUrl}b_shell_nut_favicon.gif`,
|
||||||
|
imageAlt: 'Bradley Shellnut Website Logo'
|
||||||
},
|
},
|
||||||
...$page.data.metaTagsChild
|
...$page.data.metaTagsChild
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import type { PageServerLoad } from './lib/$types';
|
||||||
import { fetchBandcampAlbums } from '$root/lib/util/fetchBandcampAlbums';
|
import { fetchBandcampAlbums } from '$root/lib/util/fetchBandcampAlbums';
|
||||||
|
|
||||||
export const load: PageServerLoad = async ({ fetch, setHeaders, url }) => {
|
export const load: PageServerLoad = async ({ fetch, setHeaders, url }) => {
|
||||||
|
const baseUrl = new URL(url.origin).href;
|
||||||
const metaTags: MetaTagsProps = Object.freeze({
|
const metaTags: MetaTagsProps = Object.freeze({
|
||||||
title: 'Home',
|
title: 'Home',
|
||||||
description: "My name is Bradley Shellnut and I'm a Full Stack Software Engineer.",
|
description: "My name is Bradley Shellnut and I'm a Full Stack Software Engineer.",
|
||||||
|
|
@ -11,19 +12,10 @@ export const load: PageServerLoad = async ({ fetch, setHeaders, url }) => {
|
||||||
description: "My name is Bradley Shellnut and I'm a Full Stack Software Engineer.",
|
description: "My name is Bradley Shellnut and I'm a Full Stack Software Engineer.",
|
||||||
url: new URL(url.pathname, url.origin).href,
|
url: new URL(url.pathname, url.origin).href,
|
||||||
siteName: 'Bradley Shellnut Personal Website',
|
siteName: 'Bradley Shellnut Personal Website',
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: `${new URL(url.origin).href}/b_shell_nut_favicon.gif`,
|
|
||||||
alt: 'Bradley Shellnut Website Logo'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
|
||||||
title: 'Home',
|
title: 'Home',
|
||||||
description: 'Home page',
|
description: 'Home page',
|
||||||
images: `${new URL(url.origin).href}/b_shell_nut_favicon.gif`,
|
|
||||||
imageAlt: 'Bradley Shellnut Website Logo'
|
|
||||||
},
|
},
|
||||||
url: new URL(url.pathname, url.origin).href
|
url: new URL(url.pathname, url.origin).href
|
||||||
});
|
});
|
||||||
|
|
@ -35,6 +27,7 @@ export const load: PageServerLoad = async ({ fetch, setHeaders, url }) => {
|
||||||
'cache-control': 'max-age=43200'
|
'cache-control': 'max-age=43200'
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
baseUrl,
|
||||||
metaTagsChild: metaTags,
|
metaTagsChild: metaTags,
|
||||||
albums: albums(),
|
albums: albums(),
|
||||||
articlesData: (await articles()).json()
|
articlesData: (await articles()).json()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue