forked from leerob/site
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to
app
directory + new design. (leerob#564)
- Loading branch information
Showing
301 changed files
with
9,586 additions
and
9,536 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
IS_TEMPLATE=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,14 @@ | ||
// For retrieving Unsplash metrics | ||
UNSPLASH_ACCESS_KEY= | ||
# For blog views and guestbook | ||
DATABASE_URL="mysql://..." | ||
|
||
// For retrieving YouTube metrics | ||
GOOGLE_PRIVATE_KEY= | ||
GOOGLE_CLIENT_EMAIL= | ||
|
||
// For showing now playing song from Spotify | ||
SPOTIFY_CLIENT_ID= | ||
SPOTIFY_CLIENT_SECRET= | ||
SPOTIFY_REFRESH_TOKEN= | ||
|
||
// For NextAuth.js and GitHub OAuth | ||
# For /guestbook | ||
NEXTAUTH_URL=http://localhost:3000 | ||
NEXTAUTH_SECRET= | ||
OAUTH_CLIENT_KEY= | ||
OAUTH_CLIENT_SECRET= | ||
NEXTAUTH_URL=http://localhost:3000 | ||
|
||
// For retrieving Tweets | ||
TWITTER_API_KEY= | ||
|
||
// For post views and guestbook | ||
DATABASE_URL= | ||
# For tweets in /blog | ||
TWITTER_API_TOKEN= | ||
|
||
// For Sanity CMS | ||
NEXT_PUBLIC_SANITY_PROJECT_ID= | ||
NEXT_PUBLIC_SANITY_DATASET= | ||
SANITY_API_TOKEN= | ||
SANITY_PREVIEW_SECRET= | ||
SANITY_STUDIO_REVALIDATE_SECRET= | ||
# For redirects | ||
EDGE_CONFIG= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,40 @@ | ||
*.log | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.next | ||
node_modules | ||
*.pem | ||
.vscode | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
.env | ||
.sanity | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# contentlayer | ||
.contentlayer |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import { | ||
GitHubIcon, | ||
YoutubeIcon, | ||
ArrowIcon, | ||
TwitterIcon, | ||
} from 'components/icons'; | ||
|
||
export const metadata = { | ||
title: 'About', | ||
description: 'VP of Developer Experience at Vercel.', | ||
}; | ||
|
||
export default function AboutPage() { | ||
return ( | ||
<section> | ||
<h1 className="font-bold text-3xl font-serif">About Me</h1> | ||
<p className="my-5 text-neutral-800 dark:text-neutral-200"> | ||
Hey, I'm Lee. Most folks know me as <b>leerob</b> online. | ||
</p> | ||
<div className="prose prose-neutral dark:prose-invert text-neutral-800 dark:text-neutral-200"> | ||
<p> | ||
I'm currently the <b>VP of Developer Experience at Vercel</b>, where I | ||
lead our Developer Relations and Documentation teams. I focus on{' '} | ||
<b>educating and growing</b> the Vercel and Next.js communities. | ||
</p> | ||
<hr /> | ||
<p> | ||
I'm passionate about many creative pursuits, including music, | ||
photography, videography, and of course, coding. This combination of | ||
interests is what ultimately led me to my current role in building | ||
developer communities. | ||
</p> | ||
<p> | ||
I <b>love</b> building for the web. From something as simple as a | ||
single HTML file – all the way to large Next.js applications. The web | ||
is incredible. Anyone can become a developer, writer, or creator – and | ||
no one has to ask for permission. You can just build. | ||
</p> | ||
<p className="mb-8"> | ||
Outside of Vercel, I <b>angel invest</b> in developer tools companies | ||
and <b>advise early-stage startups</b>. I also do Developer Relations | ||
consulting work, helping companies take their DevRel function from 0 | ||
to 1, or provide guidance on growing communities, content creation, | ||
and developer marketing. | ||
</p> | ||
<div className="flex flex-col gap-2 md:flex-row md:gap-2"> | ||
<a | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
href="https://twitter.com/leeerob" | ||
className="flex w-full border border-neutral-200 dark:border-neutral-800 rounded-lg p-4 no-underline items-center text-neutral-800 dark:text-neutral-200 hover:dark:bg-neutral-900 hover:bg-neutral-100 transition-all justify-between" | ||
> | ||
<div className="flex items-center"> | ||
<TwitterIcon /> | ||
<div className="ml-3">Twitter</div> | ||
</div> | ||
<ArrowIcon /> | ||
</a> | ||
<a | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
href="https://github.com/leerob" | ||
className="flex w-full border border-neutral-200 dark:border-neutral-800 rounded-lg p-4 no-underline items-center text-neutral-800 dark:text-neutral-200 hover:dark:bg-neutral-900 hover:bg-neutral-100 transition-all justify-between" | ||
> | ||
<div className="flex items-center"> | ||
<GitHubIcon /> | ||
<div className="ml-3">GitHub</div> | ||
</div> | ||
<ArrowIcon /> | ||
</a> | ||
<a | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
href="https://www.youtube.com/@leerob" | ||
className="flex w-full border border-neutral-200 dark:border-neutral-800 rounded-lg p-4 no-underline items-center text-neutral-800 dark:text-neutral-200 hover:dark:bg-neutral-900 hover:bg-neutral-100 transition-all justify-between" | ||
> | ||
<div className="flex items-center"> | ||
<YoutubeIcon /> | ||
<div className="ml-3">YouTube</div> | ||
</div> | ||
<ArrowIcon /> | ||
</a> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { allBlogs } from 'contentlayer/generated'; | ||
|
||
export default async function Head({ params }) { | ||
const post = allBlogs.find((post) => post.slug === params.slug) || { | ||
title: 'Not Found', | ||
summary: 'This page could not be found.', | ||
image: 'https://leerob.io/api/og?title=Not%20Found', | ||
publishedAt: new Date().toISOString(), | ||
}; | ||
|
||
const ogImage = post.image | ||
? post.image | ||
: `https://leerob.io/api/og?title=${post.title}`; | ||
|
||
return ( | ||
<> | ||
<title>{`${post.title} – Lee Robinson`}</title> | ||
<meta content={post.summary} name="description" /> | ||
<meta | ||
property="og:url" | ||
content={`https://leerob.io/blog/${params.slug}`} | ||
/> | ||
<link rel="canonical" href={`https://leerob.io/blog/${params.slug}`} /> | ||
<meta property="og:description" content={post.summary} /> | ||
<meta property="og:title" content={post.title} /> | ||
<meta property="og:image" content={ogImage} /> | ||
<meta name="twitter:title" content={post.title} /> | ||
<meta name="twitter:description" content={post.summary} /> | ||
<meta name="twitter:image" content={ogImage} /> | ||
<meta property="article:published_time" content={post.publishedAt} /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { allBlogs } from 'contentlayer/generated'; | ||
|
||
// Currently, params isn't correctly passted to `generateMetadata`. | ||
// Once that's fixed, I can remove `head.tsx`. | ||
export async function generateMetadata({ params }) { | ||
const post = allBlogs.find((post) => post.slug === params.slug); | ||
const { | ||
title: postTitle, | ||
publishedAt: publishedTime, | ||
summary: description, | ||
image, | ||
slug, | ||
} = post; | ||
const title = `${postTitle} - Lee Robinson`; | ||
const ogImage = image ? image : `https://leerob.io/api/og?title=${title}`; | ||
|
||
return { | ||
title, | ||
description, | ||
openGraph: { | ||
title, | ||
description, | ||
type: 'article', | ||
publishedTime, | ||
url: `https://leerob.io/blog/${slug}`, | ||
images: [ | ||
{ | ||
url: ogImage, | ||
}, | ||
], | ||
}, | ||
twitter: { | ||
title, | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { notFound } from 'next/navigation'; | ||
import { getViews } from 'lib/planetscale'; | ||
import { Mdx } from 'components/mdx'; | ||
import { allBlogs } from 'contentlayer/generated'; | ||
import { getTweets } from 'lib/twitter'; | ||
import Balancer from 'react-wrap-balancer'; | ||
import ViewCounter from './view-counter'; | ||
|
||
export async function generateStaticParams() { | ||
return allBlogs.map((post) => ({ | ||
slug: post.slug, | ||
})); | ||
} | ||
|
||
export default async function Blog({ params }) { | ||
const post = allBlogs.find((post) => post.slug === params.slug); | ||
|
||
if (!post) { | ||
notFound(); | ||
} | ||
|
||
const views = await getViews(post.slug); | ||
const tweets = await getTweets(post.tweetIds); | ||
|
||
return ( | ||
<section> | ||
<h1 className="font-bold text-3xl font-serif max-w-[650px]"> | ||
<Balancer>{post.title}</Balancer> | ||
</h1> | ||
<div className="grid grid-cols-[auto_1fr_auto] items-center mt-4 mb-8 font-mono text-sm max-w-[650px]"> | ||
<div className="bg-neutral-100 dark:bg-neutral-800 rounded-md px-2 py-1 tracking-tighter"> | ||
{post.publishedAt} | ||
</div> | ||
<div className="h-[0.2em] bg-neutral-50 dark:bg-neutral-800 mx-2" /> | ||
<ViewCounter slug={post.slug} views={views} /> | ||
</div> | ||
<Mdx code={post.body.code} tweets={tweets} /> | ||
</section> | ||
); | ||
} |
Oops, something went wrong.