mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 14:25:31 -04:00
Migrate to app router (#2254)
This commit is contained in:
@@ -15,8 +15,6 @@ const config = {
|
||||
licenseUrl: "https://creativecommons.org/licenses/by/4.0/",
|
||||
copyrightYearStart: 2001,
|
||||
githubRepo: "jakejarvis/jarv.is",
|
||||
verifyGoogle: "qQhmLTwjNWYgQ7W42nSTq63xIrTch13X_11mmxBE9zk",
|
||||
verifyBing: "164551986DA47F7F6FC0D21A93FFFCA6",
|
||||
giscusConfig: {
|
||||
// https://github.com/giscus/giscus-component/tree/main/packages/react#readme
|
||||
repoId: "MDEwOlJlcG9zaXRvcnk1MzM0MDgxMQ==",
|
||||
@@ -35,6 +33,7 @@ const config = {
|
||||
linkedin: "jakejarvis",
|
||||
instagram: "jakejarvis",
|
||||
mastodon: "fediverse.jarv.is/@jake",
|
||||
bluesky: "jarv.is",
|
||||
},
|
||||
};
|
||||
|
||||
|
@@ -3,22 +3,22 @@ import type { MenuItemProps } from "../../components/MenuItem";
|
||||
|
||||
export const menuItems: MenuItemProps[] = [
|
||||
{
|
||||
icon: FiHome,
|
||||
Icon: FiHome,
|
||||
text: "Home",
|
||||
href: "/",
|
||||
},
|
||||
{
|
||||
icon: FiEdit3,
|
||||
Icon: FiEdit3,
|
||||
text: "Notes",
|
||||
href: "/notes",
|
||||
},
|
||||
{
|
||||
icon: FiCode,
|
||||
Icon: FiCode,
|
||||
text: "Projects",
|
||||
href: "/projects",
|
||||
},
|
||||
{
|
||||
icon: FiMail,
|
||||
Icon: FiMail,
|
||||
text: "Contact",
|
||||
href: "/contact",
|
||||
},
|
||||
|
@@ -1,123 +0,0 @@
|
||||
import config from "./index.js";
|
||||
import { meJpg, faviconPng, faviconIco, appleTouchIconPng } from "./favicons";
|
||||
|
||||
import type { DefaultSeoProps, SocialProfileJsonLdProps, ArticleJsonLdProps } from "next-seo";
|
||||
|
||||
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `https://${config.siteDomain}`;
|
||||
|
||||
// Most of this file simply takes the data already defined in ./config.js and translates it into objects that are
|
||||
// compatible with next-seo's props:
|
||||
// https://github.com/garmeeh/next-seo#default-seo-configuration
|
||||
export const defaultSeo: DefaultSeoProps = {
|
||||
defaultTitle: `${config.siteName} – ${config.shortDescription}`,
|
||||
titleTemplate: `%s – ${config.siteName}`, // appends `– siteName` to title provided by each page (except home)
|
||||
description: config.longDescription,
|
||||
openGraph: {
|
||||
siteName: config.siteName,
|
||||
title: `${config.siteName} – ${config.shortDescription}`,
|
||||
locale: config.siteLocale?.replace("-", "_"),
|
||||
type: "website",
|
||||
images: [
|
||||
{
|
||||
url: `${baseUrl}${meJpg.src}`,
|
||||
alt: `${config.siteName} – ${config.shortDescription}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
handle: `@${config.authorSocial?.twitter}`,
|
||||
site: `@${config.authorSocial?.twitter}`,
|
||||
cardType: "summary",
|
||||
},
|
||||
additionalMetaTags: [
|
||||
{
|
||||
name: "viewport",
|
||||
content: "width=device-width, initial-scale=1",
|
||||
},
|
||||
{
|
||||
name: "author",
|
||||
content: config.authorName,
|
||||
},
|
||||
{
|
||||
name: "google-site-verification",
|
||||
content: config.verifyGoogle,
|
||||
},
|
||||
{
|
||||
name: "msvalidate.01",
|
||||
content: config.verifyBing,
|
||||
},
|
||||
],
|
||||
additionalLinkTags: [
|
||||
{
|
||||
rel: "icon",
|
||||
href: faviconIco.src,
|
||||
sizes: "any", // https://twitter.com/subzey/status/1417099064949235712
|
||||
},
|
||||
{
|
||||
rel: "icon",
|
||||
href: faviconPng.src,
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
rel: "apple-touch-icon",
|
||||
href: appleTouchIconPng.src,
|
||||
sizes: `${appleTouchIconPng.width}x${appleTouchIconPng.height}`,
|
||||
},
|
||||
{
|
||||
rel: "manifest",
|
||||
href: "/site.webmanifest",
|
||||
},
|
||||
{
|
||||
rel: "alternate",
|
||||
href: "/feed.xml",
|
||||
type: "application/rss+xml",
|
||||
// @ts-ignore
|
||||
title: `${config.siteName} (RSS)`,
|
||||
},
|
||||
{
|
||||
rel: "alternate",
|
||||
href: "/feed.atom",
|
||||
type: "application/atom+xml",
|
||||
// @ts-ignore
|
||||
title: `${config.siteName} (Atom)`,
|
||||
},
|
||||
{
|
||||
rel: "humans",
|
||||
href: "/humans.txt",
|
||||
},
|
||||
{
|
||||
rel: "pgpkey",
|
||||
href: "/pubkey.asc",
|
||||
type: "application/pgp-keys",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// https://github.com/garmeeh/next-seo#social-profile
|
||||
export const socialProfileJsonLd: SocialProfileJsonLdProps = {
|
||||
type: "Person",
|
||||
name: config.authorName,
|
||||
url: `${baseUrl}/`,
|
||||
sameAs: [
|
||||
`${baseUrl}/`,
|
||||
`https://github.com/${config.authorSocial?.github}`,
|
||||
`https://keybase.io/${config.authorSocial?.keybase}`,
|
||||
`https://twitter.com/${config.authorSocial?.twitter}`,
|
||||
`https://medium.com/@${config.authorSocial?.medium}`,
|
||||
`https://www.linkedin.com/in/${config.authorSocial?.linkedin}/`,
|
||||
`https://www.facebook.com/${config.authorSocial?.facebook}`,
|
||||
`https://www.instagram.com/${config.authorSocial?.instagram}/`,
|
||||
`https://${config.authorSocial?.mastodon}`,
|
||||
],
|
||||
};
|
||||
|
||||
// Just the basic items applicable to all notes, extended by pages/notes/[slug].tsx
|
||||
// https://github.com/garmeeh/next-seo#article-1
|
||||
export const articleJsonLd: Pick<ArticleJsonLdProps, "authorName" | "publisherName" | "publisherLogo"> = {
|
||||
authorName: {
|
||||
name: config.authorName,
|
||||
url: `${baseUrl}/`,
|
||||
},
|
||||
publisherName: config.siteName,
|
||||
publisherLogo: `${baseUrl}${meJpg.src}`,
|
||||
};
|
Reference in New Issue
Block a user