From 57364eaaa925099d19ff60ed51ad3d103092f87e Mon Sep 17 00:00:00 2001 From: xylophonez Date: Wed, 8 Apr 2026 11:10:55 +0100 Subject: [PATCH] chore: update permalink url for blog --- src/App.tsx | 6 +++++- src/config.ts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 3b8f2ac..3f310c0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,6 +3,7 @@ import { Link, Navigate, Route, Routes, useLocation, useParams } from "react-rou import { BLOG_DEFAULT_DESCRIPTION, BLOG_NAME, + BLOG_PERMALINK_PREFIX, BLOG_SITE_URL, BLOG_TWITTER_HANDLE } from "./config"; @@ -31,6 +32,7 @@ const LOADER_FRAMES = [load1, load2, load3, load4, load5, load6]; const FORCE_LOADER_PREVIEW = false; const toAbsoluteUrl = (path = "/"): string => new URL(path, BLOG_SITE_URL).toString(); +const toPermalinkUrl = (path = "/"): string => new URL(path, BLOG_PERMALINK_PREFIX).toString(); const setMetaTag = (attribute: "name" | "property", key: string, content?: string): void => { if (!content) return; @@ -338,7 +340,9 @@ function PostPage({ const bannerTxId = postFrontmatter.banner || post?.frontmatter?.banner || post?.bannerTxId; const publishedDate = getReadableDate(postFrontmatter.date || post?.publishedAt); const updatedDate = getReadableDate(postFrontmatter.updated || post?.updated || undefined); - const permalink = post ? toAbsoluteUrl(`/${post.slug}`) : toAbsoluteUrl(location.pathname); + const permalink = post + ? toPermalinkUrl(`/${post.slug}`) + : toPermalinkUrl(location.pathname); usePageMetadata({ title: post ? `${title} | ${BLOG_NAME}` : `${BLOG_NAME} | Post Not Found`, diff --git a/src/config.ts b/src/config.ts index 344eceb..0295a06 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,5 +1,6 @@ export const BLOG_NAME = "hyperzine"; export const BLOG_SITE_URL = "https://zpz3tbjvlwkkrkn2talxgib6plcj62d3r3gpjebyinbcu7oa7bjq.arweave.net"; +export const BLOG_PERMALINK_PREFIX = "https://386464538491k.arweave.net"; export const BLOG_DEFAULT_DESCRIPTION = "A blog about cyberspace decentralization"; export const BLOG_TWITTER_HANDLE = "";