~james/core

core/web/src/lib/markup/pageContext.ts -rw-r--r-- 306 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 15 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
import { page } from "$app/state";
import type { MarkupContext } from "#lib/markup/paths.ts";

export const repoMarkupContext = (repo: string, ref: string, dir?: string): MarkupContext => ({
	repo,
	ref,
	dir: dir || undefined,
	host: page.url.host,
	camo: page.data.publicConfig?.camoEnabled ?? false
});