mirror of
https://github.com/zyllian/zyllian.github.io.git
synced 2025-05-10 02:26:45 -07:00
change serde_yaml to serde_yml
This commit is contained in:
parent
91c65fa017
commit
35ac34b69c
4 changed files with 65 additions and 14 deletions
|
@ -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")?,
|
||||
)
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue