diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2023-08-28 21:54:57 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2023-08-28 21:54:57 +0100 |
| commit | 7c8ca1c5cf0067a350578d5589139abf076ef1ec (patch) | |
| tree | c3dfb0aa397c684dae64039524c99d28b4cec369 /app/builder/build.ts | |
| parent | b31733593683374366058a23a0a470911e2722c0 (diff) | |
Add html minification
Diffstat (limited to 'app/builder/build.ts')
| -rw-r--r-- | app/builder/build.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/builder/build.ts b/app/builder/build.ts index d894518..6807b89 100644 --- a/app/builder/build.ts +++ b/app/builder/build.ts @@ -22,6 +22,7 @@ export async function buildPages(): Promise<{ success: boolean, errors: number, // Load pages logger.info(`Reading pages from disk...`); const pageDirectory = new PageDirectory(process.env.PAGES_DIR); + await pageDirectory.init(); let pagesCount = Object.keys(pageDirectory.getPages()).length; logger.info(`Found ${pagesCount} pages.`); @@ -78,7 +79,7 @@ async function renderPage(page: Page, pageDirectory: PageDirectory): Promise<boo } export async function rebuildSinglePage(path: string, pageDirectory: PageDirectory): Promise<boolean> { - const page = pageDirectory.loadPage(path); + const page = await pageDirectory.loadPage(path); if (!page) { return false; } |
