| | |
| | | |
| | | return graph |
| | | }, |
| | | async emit(ctx, content, resources): Promise<FilePath[]> { |
| | | async *emit(ctx, content, resources) { |
| | | const cfg = ctx.cfg.configuration |
| | | const fps: FilePath[] = [] |
| | | const allFiles = content.map((c) => c[1].data) |
| | | |
| | | let containsIndex = false |
| | |
| | | containsIndex = true |
| | | } |
| | | |
| | | if (file.data.slug?.endsWith("/index")) { |
| | | continue |
| | | } |
| | | |
| | | const externalResources = pageResources(pathToRoot(slug), file.data, resources) |
| | | const componentData: QuartzComponentProps = { |
| | | ctx, |
| | |
| | | } |
| | | |
| | | const content = renderPage(cfg, slug, componentData, opts, externalResources) |
| | | const fp = await write({ |
| | | yield write({ |
| | | ctx, |
| | | content, |
| | | slug, |
| | | ext: ".html", |
| | | }) |
| | | |
| | | fps.push(fp) |
| | | } |
| | | |
| | | if (!containsIndex && !ctx.argv.fastRebuild) { |
| | |
| | | ), |
| | | ) |
| | | } |
| | | |
| | | return fps |
| | | }, |
| | | } |
| | | } |