mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-21 19:35:59 -04:00
freeze build timestamp via an environment variable
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
// Next.js constants (not needed in frontend)
|
||||
export const NOTES_DIR = "./notes";
|
||||
|
||||
// normalize the timestamp saved when building/deploying (see next.config.js) and fall back to right now:
|
||||
export const RELEASE_DATE = new Date(process.env.RELEASE_DATE ?? Date.now()).toISOString();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Feed } from "feed";
|
||||
import { getAllNotes } from "./parse-notes";
|
||||
import * as config from "../config";
|
||||
import { RELEASE_DATE } from "../config/constants";
|
||||
import type { GetServerSidePropsContext, PreviewData } from "next";
|
||||
import type { ParsedUrlQuery } from "querystring";
|
||||
|
||||
@@ -20,7 +21,7 @@ export const buildFeed = (
|
||||
title: config.siteName,
|
||||
description: config.longDescription,
|
||||
copyright: "https://creativecommons.org/licenses/by/4.0/",
|
||||
updated: new Date(),
|
||||
updated: new Date(RELEASE_DATE),
|
||||
image: `${config.baseUrl}/static/images/me.jpg`,
|
||||
feedLinks: {
|
||||
rss: `${config.baseUrl}/feed.xml`,
|
||||
|
||||
Reference in New Issue
Block a user