wheeee i love vercel

This commit is contained in:
Jack 2023-10-31 22:47:51 -04:00
parent 383d1b7c87
commit 356b92233c
No known key found for this signature in database
GPG Key ID: F6FFDCED8A519F98
5 changed files with 31 additions and 4 deletions

View File

@ -17,6 +17,7 @@
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6", "@types/react-dom": "^18.0.6",
"astro": "^3.4.0", "astro": "^3.4.0",
"astro-seo": "^0.8.0",
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"tailwindcss": "^3.0.24" "tailwindcss": "^3.0.24"

View File

@ -1,3 +1,5 @@
export const prerender = false;
import type { APIRoute } from "astro"; import type { APIRoute } from "astro";
export const GET: APIRoute = async ({ params, request }) => { export const GET: APIRoute = async ({ params, request }) => {
@ -21,6 +23,12 @@ export const GET: APIRoute = async ({ params, request }) => {
song: track.name, song: track.name,
nowPlaying: track["@attr"]?.nowplaying || false, nowPlaying: track["@attr"]?.nowplaying || false,
url: track.url, url: track.url,
}) }),
{
headers: {
"content-type": "application/json;charset=UTF-8",
},
status: 200,
}
); );
}; };

View File

@ -1,3 +1,5 @@
export const prerender = false;
import type { APIRoute } from "astro"; import type { APIRoute } from "astro";
export const GET: APIRoute = async ({ params, request }) => { export const GET: APIRoute = async ({ params, request }) => {
@ -32,5 +34,10 @@ export const GET: APIRoute = async ({ params, request }) => {
return new Response(JSON.stringify({ image: null, repo }), { status: 404 }); return new Response(JSON.stringify({ image: null, repo }), { status: 404 });
} }
return new Response(JSON.stringify({ image: image[0], repo })); return new Response(JSON.stringify({ image: image[0], repo }), {
status: 200,
headers: {
"content-type": "application/json;charset=UTF-8",
},
});
}; };

View File

@ -6,7 +6,7 @@ import SocialNetworks from '../components/SocialNetworks'
import TechStack from '../components/TechStack' import TechStack from '../components/TechStack'
import WAIWO from '../components/WAIWO' import WAIWO from '../components/WAIWO'
import PictureShowcase from '../components/PictureShowcase' import PictureShowcase from '../components/PictureShowcase'
import { SEO } from 'astro-seo'
--- ---
<html lang="en"> <html lang="en">
@ -16,7 +16,13 @@ import PictureShowcase from '../components/PictureShowcase'
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<link rel="stylesheet" href="/css/sentient.css"> <link rel="stylesheet" href="/css/sentient.css">
<title>Jack Merrill</title> <SEO
title="Jack Merrill"
description="UI/UX designer and front-end developer based in Western Massachussetts."
twitter={{
creator: "@jack__merrill"
}}
/>
</head> </head>
<body class="font-serif text-white bg-gradient-to-b from-[#060009] to-[#08000B] min-h-[100svh] py-6"> <body class="font-serif text-white bg-gradient-to-b from-[#060009] to-[#08000B] min-h-[100svh] py-6">
<main class="mx-auto max-w-4xl grid grid-cols-2 gap-x-3 gap-y-4"> <main class="mx-auto max-w-4xl grid grid-cols-2 gap-x-3 gap-y-4">

View File

@ -879,6 +879,11 @@ array-iterate@^2.0.0:
resolved "https://registry.yarnpkg.com/array-iterate/-/array-iterate-2.0.1.tgz#6efd43f8295b3fee06251d3d62ead4bd9805dd24" resolved "https://registry.yarnpkg.com/array-iterate/-/array-iterate-2.0.1.tgz#6efd43f8295b3fee06251d3d62ead4bd9805dd24"
integrity sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg== integrity sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==
astro-seo@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/astro-seo/-/astro-seo-0.8.0.tgz#4d930a8fc3e23fd1b9923486843b2a85febae35d"
integrity sha512-7gq6lhibCM8FuzZIJlbLLWP5EJ9KL2/4XqeFrAg9O6ZK2xMFxJ5ubKf+a0VJwwTu8W8Xr421CmpiXu6Hq7n/7Q==
astro@^3.4.0: astro@^3.4.0:
version "3.4.0" version "3.4.0"
resolved "https://registry.yarnpkg.com/astro/-/astro-3.4.0.tgz#d73cd96a8f96d9349c86f8e05c2f512ba4ba9287" resolved "https://registry.yarnpkg.com/astro/-/astro-3.4.0.tgz#d73cd96a8f96d9349c86f8e05c2f512ba4ba9287"