custom front matter parser for showing errors + make all extras configurable from the page side

This commit is contained in:
zyl 2024-11-04 16:20:03 -08:00
parent 159c8fa5b3
commit 76c75a40d9
Signed by: zyl
SSH key fingerprint: SHA256:uxxbSXbdroP/OnKBGnEDk5q7EKB2razvstC/KmzdXXs
9 changed files with 119 additions and 97 deletions

View file

@ -1,5 +1,6 @@
mod builder;
mod extras;
mod frontmatter;
mod link_list;
mod resource;
#[cfg(feature = "serve")]
@ -11,6 +12,7 @@ use std::{
path::{Path, PathBuf},
};
use extras::ExtraData;
use eyre::Context;
use rayon::prelude::*;
use resource::{EmbedMetadata, ResourceBuilderConfig};
@ -73,7 +75,8 @@ pub struct PageMetadata {
#[serde(default)]
pub styles: Vec<String>,
/// The extra stuff to run for the page, if any.
pub extra: Option<String>,
#[serde(default)]
pub extra: Option<ExtraData>,
}
/// Struct containing information about the site.