1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-17 17:25:29 -04:00

clean up remaining NEXT_PUBLIC_ environment variables

This commit is contained in:
2025-04-13 16:28:00 -04:00
parent f08aa16862
commit b60fbcc15c
21 changed files with 137 additions and 117 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
import { env } from "../../lib/env";
import path from "path";
import fs from "fs/promises";
import glob from "fast-glob";
import { unified } from "unified";
import { remarkHtml, remarkParse, remarkSmartypants, remarkFrontmatter } from "./remark-rehype-plugins";
import { decode } from "html-entities";
import { BASE_URL, POSTS_DIR } from "../config/constants";
import { POSTS_DIR } from "../config/constants";
export type FrontMatter = {
slug: string;
@@ -77,7 +78,7 @@ Promise<any> => {
slug,
// validate/normalize the date string provided from front matter
date: new Date(frontmatter.date).toISOString(),
permalink: `${BASE_URL}/${POSTS_DIR}/${slug}`,
permalink: `${env.NEXT_PUBLIC_BASE_URL}/${POSTS_DIR}/${slug}`,
} as FrontMatter;
} catch (error) {
console.error(`Failed to load front matter for post with slug "${slug}":`, error);