This commit is contained in:
Rizky 2024-02-26 12:06:26 +07:00
parent 6831e13aae
commit dac64ba078
3 changed files with 16 additions and 11 deletions

View File

@ -159,16 +159,18 @@ export const Root = () => {
if (load_urls.length > 0) { if (load_urls.length > 0) {
const pages = await loadUrls(load_urls); const pages = await loadUrls(load_urls);
for (const page of pages) { if (Array.isArray(pages)) {
const p = { for (const page of pages) {
id: page.id, const p = {
url: page.url, id: page.id,
root: page.root, url: page.url,
meta: {}, root: page.root,
}; meta: {},
await scanComponent(page.root.childs); };
rebuildMeta(p.meta, page.root); await scanComponent(page.root.childs);
base.page.cache[p.id] = p; rebuildMeta(p.meta, page.root);
base.page.cache[p.id] = p;
}
} }
} }
}} }}

BIN
dockerzip

Binary file not shown.

View File

@ -8,7 +8,10 @@ if (!g.dockerPrepared) {
g.dockerPrepared = true; g.dockerPrepared = true;
const dir = { const dir = {
path(...allpath: any[]) { path(...allpath: any[]) {
return path.join(process.cwd(), ...allpath); return path.join(
process.cwd(),
...allpath.map((e) => (Array.isArray(e) ? e.join("") : e))
);
}, },
read(dirPath: string, baseDir?: string[]): Record<string, string> { read(dirPath: string, baseDir?: string[]): Record<string, string> {
const result: Record<string, string> = {}; const result: Record<string, string> = {};