Chunking the blog posts for the stream.

This commit is contained in:
Tom Alexander
2023-12-17 16:57:37 -05:00
parent fdf84e3d0b
commit c3482cf1e4
6 changed files with 84 additions and 10 deletions

View File

@@ -71,4 +71,13 @@ impl Config {
pub(crate) fn get_site_title(&self) -> Option<&str> {
self.raw.site_title.as_deref()
}
pub(crate) fn get_stream_entries_per_page(&self) -> usize {
self.raw
.stream
.as_ref()
.map(|stream| stream.entries_per_page)
.flatten()
.unwrap_or(5)
}
}