From dc6233cf4a466fe2ee4701cd5d1447c8007f0a6e Mon Sep 17 00:00:00 2001 From: Zachary Proser Date: Thu, 1 Feb 2024 20:43:54 -0500 Subject: [PATCH] Replace homepage with about page. Add permanent redirect --- next.config.mjs | 11 ++- src/app/{about => }/page.jsx | 0 src/app/page.tsx | 157 ----------------------------------- src/components/Footer.tsx | 2 +- src/components/Header.tsx | 4 +- 5 files changed, 13 insertions(+), 161 deletions(-) rename src/app/{about => }/page.jsx (100%) delete mode 100644 src/app/page.tsx diff --git a/next.config.mjs b/next.config.mjs index 59866542..bf941391 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -15,7 +15,16 @@ const nextConfig = { 'zackproser.com', 'www.zackproser.com' ], - } + }, + async redirects() { + return [ + { + source: '/about', + destination: '/', + permanent: true, + }, + ] + }, } const withMDX = nextMDX({ diff --git a/src/app/about/page.jsx b/src/app/page.jsx similarity index 100% rename from src/app/about/page.jsx rename to src/app/page.jsx diff --git a/src/app/page.tsx b/src/app/page.tsx deleted file mode 100644 index 2fbb7cc5..00000000 --- a/src/app/page.tsx +++ /dev/null @@ -1,157 +0,0 @@ -import Image from 'next/image' -import Link from 'next/link' -import clsx from 'clsx' - -import { Container } from '@/components/Container' - -import { BlogPostCard } from '@/components/BlogPostCard' -import { Newsletter } from '@/components/Newsletter' -import CV from '@/components/CV' - -import { - GitHubIcon, - InstagramIcon, - LinkedInIcon, - TwitterIcon, -} from '@/components/SocialIcons' -import wikka from '@/images/photos/wikka.webp' -import canyonRunnerImg from '@/images/canyonrunner-screens/CanyonRunner-Title-Screen.webp' -import optimizerBlogImg from '@/images/optimizer-blog.webp' -import terraformAssocImg from '@/images/terraform-associate.webp' -import teaTutorImg from '@/images/teatutor-logo.webp' -import { getAllArticles } from '@/lib/articles' -// Instead of needing to constantly update my static site, do the calculation of years that I've been working in tech in JS -import RenderNumYearsExperience from '@/components/NumYearsExperience' - -import { generateOgUrl } from '@/utils/ogUrl' - -const data = { - title: 'Homepage', - description: 'Full-stack open-source hacker, technical writer and developer advocate.', -}; - -const ogUrl = generateOgUrl(data); - -export const metadata = { - openGraph: { - title: data.title, - description: data.description, - url: ogUrl, - siteName: 'Zack Proser's portfolio', - images: [ - { - url: ogUrl, - } - ], - locale: 'en_US', - type: 'website', - }, -}; - - - -function SocialLink({ - icon: Icon, - ...props -}: React.ComponentPropsWithoutRef & { - icon: React.ComponentType<{ className?: string }> -}) { - return ( - - - - ) -} - -function Photos() { - const images = [wikka, optimizerBlogImg, canyonRunnerImg, teaTutorImg, terraformAssocImg] - let rotations = ['rotate-2', '-rotate-2', 'rotate-2', 'rotate-2', '-rotate-2'] - - return ( -
-
- {images.map((image, imageIndex) => ( -
- -
- ))} -
-
- ) -} - -export default async function Home() { - let articles = (await getAllArticles()).slice(0, 10) - - return ( - <> - -
-

- Let's level up! -

-

- I acquire and share knowledge. I open-source the majority of my work. You can read more about me here. -

- -
- - - - -
-
-
- - -
-

- On this site, I share open-source software, terminal tricks, demo videos, software career advice, advanced command line techniques and hotkeys, and - I blog about things I've learned the hard way while working in the industry for {RenderNumYearsExperience()} years. -

- -
-
- -
-
- {articles.map((article) => ( - - ))} -
-
- - -
-
-
- - ) -} diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index b505bfc4..0c92b748 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -28,7 +28,6 @@ export function Footer() {
- About Blog Videos
@@ -36,6 +35,7 @@ export function Footer() { Projects Testimonials Contact + Changelog

diff --git a/src/components/Header.tsx b/src/components/Header.tsx index c000cdcb..9772f62c 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -133,13 +133,13 @@ function MobileNavigation(

@@ -182,13 +182,13 @@ function DesktopNavigation(props: React.ComponentPropsWithoutRef<'nav'>) { return ( )