UNPKG

astro-expressive-code

Version:

Astro integration for Expressive Code, a modular syntax highlighting & annotation engine for presenting source code on the web. Offers full VS Code theme support, editor & terminal frames, copy to clipboard, text markers, collapsible sections, and more.

19 lines (16 loc) 336 B
export type PageData = { url: string blockGroupIndex: number } const pageDataMap = new Map<Request, PageData>() export function getPageData(request: Request): PageData { let data = pageDataMap.get(request) if (!data) { data = { url: request.url, blockGroupIndex: -1, } pageDataMap.set(request, data) } return data }