From 3e92530c478ac7f6c684b9d2213c305982d17a2f Mon Sep 17 00:00:00 2001 From: xylophonez Date: Thu, 3 Sep 2026 17:19:16 +0100 Subject: [PATCH] Pin the hyperzine manifest to W6EqQbl9 The mystic reference has not yet been indexed with the manifest that includes arweave-for-ao, so load that manifest directly. Blank MANIFEST_TX_ID to return to reference resolution. --- scripts/prerender-meta.mjs | 7 +++++-- src/config.ts | 3 +++ src/lib.ts | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/prerender-meta.mjs b/scripts/prerender-meta.mjs index df6cac7..30103cf 100644 --- a/scripts/prerender-meta.mjs +++ b/scripts/prerender-meta.mjs @@ -12,7 +12,8 @@ const DEFAULTS = { BLOG_SITE_URL: "https://hyperzine.xyz", BLOG_DEFAULT_DESCRIPTION: "hyperzine", ARWEAVE_GATEWAY: "https://arweave.net", - MANIFEST_REFERENCE_NAME: "" + MANIFEST_REFERENCE_NAME: "", + MANIFEST_TX_ID: "" }; const asObject = (value) => (typeof value === "object" && value !== null ? value : null); @@ -53,7 +54,8 @@ const parseConfig = async () => { BLOG_SITE_URL: pick("BLOG_SITE_URL"), BLOG_DEFAULT_DESCRIPTION: pick("BLOG_DEFAULT_DESCRIPTION"), ARWEAVE_GATEWAY: pick("ARWEAVE_GATEWAY"), - MANIFEST_REFERENCE_NAME: pick("MANIFEST_REFERENCE_NAME") + MANIFEST_REFERENCE_NAME: pick("MANIFEST_REFERENCE_NAME"), + MANIFEST_TX_ID: pick("MANIFEST_TX_ID") }; }; @@ -130,6 +132,7 @@ const fetchManifestPosts = async (config, manifestTxId) => { }; const resolveManifestTxId = async (config) => { + if (config.MANIFEST_TX_ID) return config.MANIFEST_TX_ID; if (!config.MANIFEST_REFERENCE_NAME) return ""; const names = new ReferenceClient({ gateway: config.ARWEAVE_GATEWAY || DEFAULTS.ARWEAVE_GATEWAY }); const value = await names.resolveName(config.MANIFEST_REFERENCE_NAME); diff --git a/src/config.ts b/src/config.ts index 96a7eab..c4a6919 100644 --- a/src/config.ts +++ b/src/config.ts @@ -5,6 +5,9 @@ export const BLOG_DEFAULT_DESCRIPTION = "A blog about cyberspace decentralization"; export const BLOG_TWITTER_HANDLE = ""; export const MANIFEST_REFERENCE_NAME = "mystic"; +// Pinned manifest. When set, the site loads this manifest instead of +// resolving the reference. Blank it to go back to reference resolution. +export const MANIFEST_TX_ID = "W6EqQbl9kdM7nqiqhCclZnZEQJs0Rr7sDz-N2ou4TLM"; export const ARWEAVE_GATEWAY = "https://arweave.net"; export const AO_URL = "https://push-1.forward.computer"; diff --git a/src/lib.ts b/src/lib.ts index bb5503e..2cb4f18 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -2,7 +2,7 @@ import DOMPurify from "dompurify"; import { marked, type Tokens } from "marked"; import { parse as parseYaml } from "yaml"; import { ReferenceClient } from "@permaweb/references"; -import { ARWEAVE_GATEWAY, MANIFEST_REFERENCE_NAME } from "./config"; +import { ARWEAVE_GATEWAY, MANIFEST_REFERENCE_NAME, MANIFEST_TX_ID } from "./config"; import { parseManifest, type Frontmatter, type ManifestPost } from "./types"; const formatDate = (date: string): string => @@ -111,6 +111,7 @@ const loadReferenceManifest = async () => { }; const loadCurrentManifest = async () => { + if (MANIFEST_TX_ID) return fetchManifest(MANIFEST_TX_ID); return loadReferenceManifest(); };