-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathconfig.ts
33 lines (31 loc) · 1.02 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const buildConfig = () => {
const blogId = process.env.NEXT_PUBLIC_BLOG_ID;
if (!blogId) throw new Error("NEXT_PUBLIC_BLOG_ID is missing");
const name = process.env.NEXT_PUBLIC_BLOG_DISPLAY_NAME || "Travel.";
const copyright = process.env.NEXT_PUBLIC_BLOG_COPYRIGHT || "Samantha";
const defaultTitle =
process.env.NEXT_DEFAULT_METADATA_DEFAULT_TITLE || "Travel with Samantha";
const defaultDescription = process.env.NEXT_PUBLIC_BLOG_DESCRIPTION || "Blog about travel and lifestyle.";
return {
baseUrl: process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000",
blog: {
name,
copyright,
metadata: {
title: {
absolute: defaultTitle,
default: defaultTitle,
template: `%s - ${defaultTitle}`,
},
description: defaultDescription,
},
},
ogImageSecret:
process.env.OG_IMAGE_SECRET ||
"secret_used_for_signing_and_verifying_the_og_image_url",
wisp: {
blogId,
},
};
};
export const config = buildConfig();