support for rss/calendar
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { glob } from 'glob';
|
||||
import { read_text } from '../fs';
|
||||
import { BuildState } from './state';
|
||||
import { build_partials, 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, copy_metadata, file_hash_matches, map_input_file_to_output_file, map_output_file_to_url, render_page, skip_file, update_metadata } from './helpers';
|
||||
|
||||
export async function render_text_file_templates(state: BuildState) {
|
||||
const promises: Promise<any>[] = [ ];
|
||||
@@ -39,10 +39,11 @@ 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 skip_file(state, in_file, out_file, out_url, frontmatter);
|
||||
return copy_metadata(state, in_file);
|
||||
}
|
||||
|
||||
await render_page(state, out_file, out_url, text, false, frontmatter);
|
||||
update_metadata(state, in_file, hash);
|
||||
}
|
||||
|
Reference in New Issue
Block a user