From 0a1b868efb2ffbaad75a649e39bc199f991e9abd Mon Sep 17 00:00:00 2001 From: janezd Date: Fri, 15 May 2026 15:30:46 +0200 Subject: [PATCH 1/2] Fix storing of inheritables (css, favicon) in the database --- ingest/inheritables.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ingest/inheritables.ts b/ingest/inheritables.ts index 6fc4653..811024b 100644 --- a/ingest/inheritables.ts +++ b/ingest/inheritables.ts @@ -16,9 +16,10 @@ export type InheritableResources = { export const getInheritableResources = (prefix: string): InheritableResources => [ ...resources .filter(({file}) => pathExists(prefix, file)) - .map(({type}) => ({ + .map(({type, db}) => ({ type, - path: prefix + path: prefix, + db: db ?? true })), ...readPublicDir(prefix) .map((subdir) => `${prefix}/${subdir}`) From c9bb748f102998bc7bedc20498665b429e8ed6a5 Mon Sep 17 00:00:00 2001 From: janezd Date: Fri, 15 May 2026 15:31:18 +0200 Subject: [PATCH 2/2] Don't append repo prefixes to links starting with # --- ingest/plugins.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingest/plugins.ts b/ingest/plugins.ts index e309510..87ca6d0 100644 --- a/ingest/plugins.ts +++ b/ingest/plugins.ts @@ -31,7 +31,7 @@ export const addRelativeDir = ({relativeDir}: {relativeDir: string}) => () => (t const publisher = relativeDir.split("/")[0]; const pubStart = `/${publisher}/`; const updatedLink = (url: string) => - /https?:\/\//.test(url) || url.startsWith(pubStart) ? url + /https?:\/\//.test(url) || url.startsWith(pubStart) || url[0] === "#" ? url : url.startsWith("//") ? url.slice(1) : url.startsWith("/") ? `/${publisher}${url}` : `/${relativeDir}/${url}`;