work on events

This commit is contained in:
2023-05-26 16:45:29 -07:00
parent 2dd300f4dc
commit 7297f9cd7a
9 changed files with 205 additions and 88 deletions

View File

@@ -2,7 +2,7 @@
import { glob } from 'glob';
import { read_text } from '../fs';
import { BuildState } from './state';
import { build_partials, copy_metadata, file_hash_matches, map_input_file_to_output_file, map_output_file_to_url, render_page, skip_file, update_metadata } from './helpers';
import { build_partials, map_input_file_to_output_file, map_output_file_to_url, render_page } from './helpers';
export async function render_text_file_templates(state: BuildState) {
const promises: Promise<any>[] = [ ];
@@ -39,11 +39,5 @@ export async function render_text_file_template(state: BuildState, in_file: stri
return;
}
await render_page(state, in_file, out_file, out_url, text, false, frontmatter);
if (file_hash_matches(state, in_file, hash)) {
return copy_metadata(state, in_file);
}
update_metadata(state, in_file, hash);
await render_page(state, in_file, out_file, out_url, text, false, hash, frontmatter);
}