Feeding the templates into the renderer integration.

This commit is contained in:
Tom Alexander
2023-10-22 17:31:12 -04:00
parent fc5342adce
commit ce0819e85b
6 changed files with 89 additions and 16 deletions

View File

@@ -9,10 +9,7 @@ use crate::error::CustomError;
pub(crate) async fn build_site(args: BuildArgs) -> Result<(), CustomError> {
let config = Config::load_from_file(args.config).await?;
let blog_posts = load_blog_posts(&config).await?;
let renderer = SiteRenderer {
output_directory: get_output_directory(&config).await?,
blog_posts,
};
let renderer = SiteRenderer::new(get_output_directory(&config).await?, blog_posts);
renderer.render_blog_posts().await?;
Ok(())