The masthead wears its deploy stamp
A small yyyy.mm.dd.hh.mm mark beside the edition line, baked in at build time — and the deploy builds moments before it ships, so the stamp reads as deploy time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
co-authored by
Claude Fable 5
parent
154e00141c
commit
b16bbe82a6
@@ -1,6 +1,20 @@
|
||||
import { defineConfig } from "vite";
|
||||
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
||||
|
||||
// Deploys build locally moments before rsync, so build time IS deploy time.
|
||||
const now = new Date();
|
||||
const pad = (n: number) => String(n).padStart(2, "0");
|
||||
const stamp = [
|
||||
now.getFullYear(),
|
||||
pad(now.getMonth() + 1),
|
||||
pad(now.getDate()),
|
||||
pad(now.getHours()),
|
||||
pad(now.getMinutes()),
|
||||
].join(".");
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [svelte()],
|
||||
define: {
|
||||
__BUILD_STAMP__: JSON.stringify(stamp),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user