change serde_yaml to serde_yml

This commit is contained in:
zyl 2024-06-21 15:01:38 -07:00
parent 91c65fa017
commit 35ac34b69c
No known key found for this signature in database
4 changed files with 65 additions and 14 deletions

View file

@ -93,7 +93,7 @@ pub struct Site {
impl Site {
/// Creates a new site from the given path.
pub fn new(site_path: &Path) -> eyre::Result<Self> {
let config: SiteConfig = serde_yaml::from_str(
let config: SiteConfig = serde_yml::from_str(
&std::fs::read_to_string(site_path.join("config.yaml"))
.wrap_err("Failed to read site config")?,
)

View file

@ -61,7 +61,7 @@ fn create(
builder.build_blog()?;
}
} else if relative_path.display().to_string() == "config.yaml" {
let new_config = serde_yaml::from_str(&std::fs::read_to_string(path)?)?;
let new_config = serde_yml::from_str(&std::fs::read_to_string(path)?)?;
builder.site.config = new_config;
builder.site.build_all_pages(builder)?;
} else if let Ok(_sass_path) = relative_path.strip_prefix(SASS_PATH) {