'/' * * // Generating /privacy/index.php * SiteGeneration::getTargetDocumentRoute() // -> '/privacy' * ``` * * @return string Path to the directory serving the current document. */ public static function getTargetDocumentRoute(): string { return dirname(SiteGeneration::getTargetDocumentPath()); } /** * Return the path of a subdocument of the current document. * * When generating "index.php", this function will return * "+index.head.php" when given a subdocument identifier of "head".; * * @param string $subdocument Subdocument identifier. * @return string Absolute source path of subdocument "+current.subdocument.php" */ public static function getOwnSubDocumentPath(string $subdocument) { $page = SiteGeneration::getAbsoluteSourceDocumentPath(); $sub_document = dirname($page) . '/+' . preg_replace('/[.]php$/', ".$subdocument.php", basename($page)); return $sub_document; } } ?>