Initial structure for rendering a blog post stream.
This commit is contained in:
@@ -89,6 +89,19 @@ impl SiteRenderer {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) async fn render_blog_stream(&self, config: &Config) -> Result<(), CustomError> {
|
||||
// TODO: Actually render a blog stream to index.html
|
||||
|
||||
// Steps: sort blog posts by date, newest first
|
||||
//
|
||||
// Steps: group blog posts based on # of posts per page
|
||||
//
|
||||
// Steps: for each group, create a RenderBlogStream
|
||||
//
|
||||
// Steps: pass each RenderBlogStream to dust as the context to render index.html and any additional stream pages.
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) async fn render_stylesheets(&self) -> Result<(), CustomError> {
|
||||
let stylesheet_output_directory = self.output_directory.join("stylesheet");
|
||||
if !stylesheet_output_directory.exists() {
|
||||
|
||||
@@ -23,6 +23,7 @@ pub(crate) async fn build_site(args: BuildArgs) -> Result<(), CustomError> {
|
||||
stylesheets,
|
||||
);
|
||||
renderer.render_blog_posts(&config).await?;
|
||||
renderer.render_blog_stream(&config).await?;
|
||||
renderer.render_stylesheets().await?;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user