Skip to content

getPageUrl

Computes the absolute URL a built page is served at.

Import:

import { getPageUrl } from '@mnaoumov/typescript-dev-toolkit/docs-site/link-check';

Signature:

function getPageUrl(relativePath: string, siteBaseUrl: string): string

Parameters:

Parameter Type Description
relativePath string The page’s path relative to the build-output root.
siteBaseUrl string The absolute base URL the site is served from (with a trailing slash).

Returns: string — The page’s absolute URL.