@wdprlib/render
    Preparing search index...

    Interface PageContext

    Contextual information about the wiki page being rendered.

    The renderer uses this to resolve relative links, local file paths, page-existence checks (adding a "newpage" CSS class to links targeting non-existent pages), and [[iftags]] evaluation.

    interface PageContext {
        domain?: string;
        pageExists?: (page: string) => boolean;
        pageName: string;
        resolveSiteDomain?: (site: string) => string | null | undefined;
        site?: string;
        siteDomains?: Record<string, string>;
        tags?: string[];
    }
    Index

    Properties

    domain?: string

    Current site domain used for absolute URL generation (e.g. "scp-wiki.example.org")

    pageExists?: (page: string) => boolean

    Returns whether a page exists on the site. When a target page does not exist, the renderer adds class="newpage" to the link element — the standard Wikidot convention for red-links.

    pageName: string

    Full page name including category prefix (e.g. "secret:test2")

    resolveSiteDomain?: (site: string) => string | null | undefined

    Resolve a cross-site page reference site slug to a domain.

    site?: string

    Site slug for the current page (e.g. "scp-wiki")

    siteDomains?: Record<string, string>

    Known domains for cross-site page references keyed by site slug.

    tags?: string[]

    Page tags used for client-side [[iftags]] evaluation during rendering