diff --git a/web/src/routes/layout.tsx b/web/src/routes/layout.tsx index 99ad960..53f0e5f 100644 --- a/web/src/routes/layout.tsx +++ b/web/src/routes/layout.tsx @@ -7,9 +7,9 @@ import Footer from "~/components/furniture/footer"; import { ChecklistContext } from "~/store/checklist-context"; import type { Sections } from "~/types/PSC"; -export const useChecklists = routeLoader$(async () => { - const remoteUrl = 'https://raw.githubusercontent.com/Lissy93/personal-security-checklist/HEAD/personal-security-checklist.yml'; - return fetch(remoteUrl) +export const useChecklists = routeLoader$(async ({ request }) => { + const localUrl = '/personal-security-checklist.yml'; + return fetch(new URL(localUrl, request.url).toString()) .then((res) => res.text()) .then((res) => jsyaml.load(res) as Sections) .catch(() => []);