Revert "Pin the hyperzine manifest to W6EqQbl9"
This reverts commit 3e92530c47.
This commit is contained in:
@@ -12,8 +12,7 @@ const DEFAULTS = {
|
|||||||
BLOG_SITE_URL: "https://hyperzine.xyz",
|
BLOG_SITE_URL: "https://hyperzine.xyz",
|
||||||
BLOG_DEFAULT_DESCRIPTION: "hyperzine",
|
BLOG_DEFAULT_DESCRIPTION: "hyperzine",
|
||||||
ARWEAVE_GATEWAY: "https://arweave.net",
|
ARWEAVE_GATEWAY: "https://arweave.net",
|
||||||
MANIFEST_REFERENCE_NAME: "",
|
MANIFEST_REFERENCE_NAME: ""
|
||||||
MANIFEST_TX_ID: ""
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const asObject = (value) => (typeof value === "object" && value !== null ? value : null);
|
const asObject = (value) => (typeof value === "object" && value !== null ? value : null);
|
||||||
@@ -54,8 +53,7 @@ const parseConfig = async () => {
|
|||||||
BLOG_SITE_URL: pick("BLOG_SITE_URL"),
|
BLOG_SITE_URL: pick("BLOG_SITE_URL"),
|
||||||
BLOG_DEFAULT_DESCRIPTION: pick("BLOG_DEFAULT_DESCRIPTION"),
|
BLOG_DEFAULT_DESCRIPTION: pick("BLOG_DEFAULT_DESCRIPTION"),
|
||||||
ARWEAVE_GATEWAY: pick("ARWEAVE_GATEWAY"),
|
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")
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -132,7 +130,6 @@ const fetchManifestPosts = async (config, manifestTxId) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const resolveManifestTxId = async (config) => {
|
const resolveManifestTxId = async (config) => {
|
||||||
if (config.MANIFEST_TX_ID) return config.MANIFEST_TX_ID;
|
|
||||||
if (!config.MANIFEST_REFERENCE_NAME) return "";
|
if (!config.MANIFEST_REFERENCE_NAME) return "";
|
||||||
const names = new ReferenceClient({ gateway: config.ARWEAVE_GATEWAY || DEFAULTS.ARWEAVE_GATEWAY });
|
const names = new ReferenceClient({ gateway: config.ARWEAVE_GATEWAY || DEFAULTS.ARWEAVE_GATEWAY });
|
||||||
const value = await names.resolveName(config.MANIFEST_REFERENCE_NAME);
|
const value = await names.resolveName(config.MANIFEST_REFERENCE_NAME);
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ export const BLOG_DEFAULT_DESCRIPTION =
|
|||||||
"A blog about cyberspace decentralization";
|
"A blog about cyberspace decentralization";
|
||||||
export const BLOG_TWITTER_HANDLE = "";
|
export const BLOG_TWITTER_HANDLE = "";
|
||||||
export const MANIFEST_REFERENCE_NAME = "mystic";
|
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 ARWEAVE_GATEWAY = "https://arweave.net";
|
||||||
|
|
||||||
export const AO_URL = "https://push-1.forward.computer";
|
export const AO_URL = "https://push-1.forward.computer";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import DOMPurify from "dompurify";
|
|||||||
import { marked, type Tokens } from "marked";
|
import { marked, type Tokens } from "marked";
|
||||||
import { parse as parseYaml } from "yaml";
|
import { parse as parseYaml } from "yaml";
|
||||||
import { ReferenceClient } from "@permaweb/references";
|
import { ReferenceClient } from "@permaweb/references";
|
||||||
import { ARWEAVE_GATEWAY, MANIFEST_REFERENCE_NAME, MANIFEST_TX_ID } from "./config";
|
import { ARWEAVE_GATEWAY, MANIFEST_REFERENCE_NAME } from "./config";
|
||||||
import { parseManifest, type Frontmatter, type ManifestPost } from "./types";
|
import { parseManifest, type Frontmatter, type ManifestPost } from "./types";
|
||||||
|
|
||||||
const formatDate = (date: string): string =>
|
const formatDate = (date: string): string =>
|
||||||
@@ -111,7 +111,6 @@ const loadReferenceManifest = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const loadCurrentManifest = async () => {
|
const loadCurrentManifest = async () => {
|
||||||
if (MANIFEST_TX_ID) return fetchManifest(MANIFEST_TX_ID);
|
|
||||||
return loadReferenceManifest();
|
return loadReferenceManifest();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user