Add notes for improving the page generation.

This commit is contained in:
Dorian 2019-07-05 09:23:37 -04:00
parent 96d99906d8
commit 736adb3665
1 changed files with 5 additions and 1 deletions

View File

@ -156,6 +156,7 @@ fn main() {
} }
} }
// TODO: Add in support for figuring out the index page or allowing one to be set.
let site_source_pages: Vec<Page> = site_source_pages let site_source_pages: Vec<Page> = site_source_pages
.iter() .iter()
.map(|source_page| { .map(|source_page| {
@ -164,9 +165,12 @@ fn main() {
let slug = String::from(source_path.file_stem().unwrap().to_str().unwrap()); let slug = String::from(source_path.file_stem().unwrap().to_str().unwrap());
let content = read_to_string(source_path).unwrap(); let content = read_to_string(source_path).unwrap();
// TODO: Be able to extract the title from the header of the markdown content.
let title = format!("Rookeries :: {}", &slug);
Page { Page {
id: Default::default(), id: Default::default(),
title: format!("Rookeries :: {}", &slug), title,
slug, slug,
content, content,
created_at: None, created_at: None,