1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-05-15 17:34:28 -04:00

validate environment variables at build time

This commit is contained in:
2025-04-09 09:11:18 -04:00
parent 84702aeab1
commit eb92e54fd6
23 changed files with 150 additions and 60 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
import { Feed } from "feed";
import { getFrontMatter, getContent } from "./posts";
import * as config from "../config";
import { BASE_URL } from "../config/constants";
import { BASE_URL, RELEASE_TIMESTAMP } from "../config/constants";
import type { Item as FeedItem } from "feed";
import ogImage from "../../app/opengraph-image.jpg";
@@ -12,12 +12,12 @@ import ogImage from "../../app/opengraph-image.jpg";
*/
export const buildFeed = async (): Promise<Feed> => {
const feed = new Feed({
id: BASE_URL,
link: BASE_URL,
id: `${BASE_URL}`,
link: `${BASE_URL}`,
title: config.siteName,
description: config.longDescription,
copyright: config.licenseUrl,
updated: new Date(process.env.RELEASE_DATE || Date.now()),
updated: new Date(RELEASE_TIMESTAMP),
image: `${BASE_URL}${ogImage.src}`,
feedLinks: {
rss: `${BASE_URL}/feed.xml`,
@@ -41,7 +41,7 @@ export const buildFeed = async (): Promise<Feed> => {
author: [
{
name: config.authorName,
link: BASE_URL,
link: `${BASE_URL}`,
},
],
date: new Date(post.date),
+1 -1
View File
@@ -1,4 +1,4 @@
import defaultMetadata from "../config/metadata";
import defaultMetadata from "../config/seo";
import type { Metadata } from "next";
/**
-7
View File
@@ -1,7 +0,0 @@
import { Redis } from "@upstash/redis";
// pulls credentials (prefixed with 'KV_REST_API_') set automatically by Vercel marketplace integration:
// https://github.com/upstash/redis-js/blob/091e0a0949593d74b905f41f7cb409ada16f936f/platforms/nodejs.ts#L184
const redis = Redis.fromEnv();
export default redis;