function _buildPageManifest(pages) {
	const fileTree = {
		label: 'Home',
		href: undefined,
		children: {},
		frontMatter: {},
		isTemplated: false,
		isPage: false
	};
	for (const [pagePath, pageContent] of Object.entries(pages)) {
		const path = pagePath.replace('/src/pages/', '');
		let node = fileTree;
		for (const part of path.split('/')) {
			if (part === '+page.md') {
				// cover home page
				if (path === '+page.md') {
					node.href = '/';
				} else if (!path.includes('[')) {
					node.href = encodeURI('/' + path.replace('/+page.md', ''));
				}
				node.frontMatter = preprocess.parseFrontmatter(pageContent);
				node.isPage = true;
			} else {
				const label = part.includes('[') ? undefined : part.replace(/_/g, ' ').replace(/-/g, ' ');
				node = node.children[part] = node.children[part] ?? {
					label,
					href: undefined,
					children: {},
					frontMatter: {},
					isTemplated: part.includes('['),
					isPage: false
				};
			}
		}
	}
	return fileTree;
}
@param {Record<string, string>} pages
@returns {PageManifestNode}