mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 14:25:31 -04:00
pre-render optimizations
This commit is contained in:
17
lib/config/constants.ts
Normal file
17
lib/config/constants.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// path to directory with .mdx files, relative to project root
|
||||
export const POSTS_DIR = "notes";
|
||||
|
||||
// path to an image used in various places to represent the site, relative to project root
|
||||
// IMPORTANT: must be included in next.config.ts under "outputFileTracingIncludes"
|
||||
export const AVATAR_PATH = "app/opengraph-image.jpg";
|
||||
|
||||
// maximum width of content wrapper (e.g. for images) in pixels
|
||||
export const MAX_WIDTH = 865;
|
||||
|
||||
// same logic as metadataBase: https://nextjs.org/docs/app/api-reference/functions/generate-metadata#default-value
|
||||
export const BASE_URL =
|
||||
process.env.NEXT_PUBLIC_VERCEL_ENV === "production" && process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
|
||||
? `https://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`
|
||||
: process.env.NEXT_PUBLIC_VERCEL_ENV === "preview" && process.env.NEXT_PUBLIC_VERCEL_URL
|
||||
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
|
||||
: `http://localhost:${process.env.PORT || 3000}`;
|
@@ -1,39 +1,28 @@
|
||||
const config = {
|
||||
// Site info
|
||||
siteName: "Jake Jarvis",
|
||||
siteLocale: "en-US",
|
||||
baseUrl:
|
||||
// same logic as metadataBase: https://nextjs.org/docs/app/api-reference/functions/generate-metadata#default-value
|
||||
process.env.NEXT_PUBLIC_VERCEL_ENV === "production" && process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
|
||||
? `https://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`
|
||||
: process.env.NEXT_PUBLIC_VERCEL_ENV === "preview" && process.env.NEXT_PUBLIC_VERCEL_URL
|
||||
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
|
||||
: `http://localhost:${process.env.PORT || 3000}`,
|
||||
timeZone: "America/New_York", // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
||||
onionDomain: "http://jarvis2i2vp4j4tbxjogsnqdemnte5xhzyi7hziiyzxwge3hzmh57zad.onion",
|
||||
shortDescription: "Front-End Web Developer in Boston, MA",
|
||||
longDescription:
|
||||
"Hi there! I'm a frontend web developer based in Boston, Massachusetts specializing in the JAMstack, modern JavaScript frameworks, and progressive web apps.",
|
||||
license: "Creative Commons Attribution 4.0 International",
|
||||
licenseAbbr: "CC-BY-4.0",
|
||||
licenseUrl: "https://creativecommons.org/licenses/by/4.0/",
|
||||
copyrightYearStart: 2001,
|
||||
githubRepo: "jakejarvis/jarv.is",
|
||||
// Site info
|
||||
export const siteName = "Jake Jarvis";
|
||||
export const siteLocale = "en-US";
|
||||
export const timeZone = "America/New_York"; // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
||||
export const onionDomain = "jarvis2i2vp4j4tbxjogsnqdemnte5xhzyi7hziiyzxwge3hzmh57zad.onion";
|
||||
export const shortDescription = "Front-End Web Developer in Boston; MA";
|
||||
export const longDescription =
|
||||
"Hi there! I'm a frontend web developer based in Boston, Massachusetts specializing in the JAMstack, modern JavaScript frameworks, and progressive web apps.";
|
||||
export const license = "Creative Commons Attribution 4.0 International";
|
||||
export const licenseAbbr = "CC-BY-4.0";
|
||||
export const licenseUrl = "https://creativecommons.org/licenses/by/4.0/";
|
||||
export const copyrightYearStart = 2001;
|
||||
export const githubRepo = "jakejarvis/jarv.is";
|
||||
|
||||
// Me info
|
||||
authorName: "Jake Jarvis",
|
||||
authorEmail: "jake@jarv.is",
|
||||
authorSocial: {
|
||||
github: "jakejarvis",
|
||||
twitter: "jakejarvis",
|
||||
facebook: "jakejarvis",
|
||||
keybase: "jakejarvis",
|
||||
medium: "jakejarvis",
|
||||
linkedin: "jakejarvis",
|
||||
instagram: "jakejarvis",
|
||||
mastodon: "fediverse.jarv.is/@jake",
|
||||
bluesky: "jarv.is",
|
||||
},
|
||||
// Me info
|
||||
export const authorName = "Jake Jarvis";
|
||||
export const authorEmail = "jake@jarv.is";
|
||||
export const authorSocial = {
|
||||
github: "jakejarvis",
|
||||
twitter: "jakejarvis",
|
||||
facebook: "jakejarvis",
|
||||
keybase: "jakejarvis",
|
||||
medium: "jakejarvis",
|
||||
linkedin: "jakejarvis",
|
||||
instagram: "jakejarvis",
|
||||
mastodon: "fediverse.jarv.is/@jake",
|
||||
bluesky: "jarv.is",
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
Reference in New Issue
Block a user