mirror of
https://github.com/cobalt-org/cobalt.rs
synced 2024-11-15 08:27:15 +00:00
refactor(config): Reduce deps
This commit is contained in:
parent
819e727cd5
commit
42282621ea
4 changed files with 9 additions and 10 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -518,7 +518,7 @@ dependencies = [
|
|||
"chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"deunicode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"liquid 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"liquid-value 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -15,7 +15,7 @@ travis-ci = { repository = "cobalt-org/cobalt.rs" }
|
|||
appveyor = { repository = "cobalt-org/cobalt.rs" }
|
||||
|
||||
[dependencies]
|
||||
liquid = "0.19"
|
||||
liquid-value = "0.19"
|
||||
chrono = "0.4"
|
||||
log = "0.4"
|
||||
regex = "1.1"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use std::fmt;
|
||||
use std::path;
|
||||
|
||||
use liquid;
|
||||
use serde;
|
||||
|
||||
use super::*;
|
||||
|
@ -35,8 +34,8 @@ pub struct Frontmatter {
|
|||
pub is_draft: Option<bool>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub weight: Option<i32>,
|
||||
#[serde(skip_serializing_if = "liquid::value::Object::is_empty")]
|
||||
pub data: liquid::value::Object,
|
||||
#[serde(skip_serializing_if = "liquid_value::Object::is_empty")]
|
||||
pub data: liquid_value::Object,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub pagination: Option<Pagination>,
|
||||
// Controlled by where the file is found. We might allow control over the type at a later
|
||||
|
@ -182,11 +181,11 @@ impl Default for SourceFormat {
|
|||
}
|
||||
}
|
||||
|
||||
/// Shallow merge of `liquid::value::Object`'s
|
||||
/// Shallow merge of `liquid_value::Object`'s
|
||||
fn merge_objects(
|
||||
mut primary: liquid::value::Object,
|
||||
secondary: &liquid::value::Object,
|
||||
) -> liquid::value::Object {
|
||||
mut primary: liquid_value::Object,
|
||||
secondary: &liquid_value::Object,
|
||||
) -> liquid_value::Object {
|
||||
for (key, value) in secondary {
|
||||
primary
|
||||
.entry(key.to_owned())
|
||||
|
|
|
@ -5,7 +5,7 @@ pub struct Site {
|
|||
pub description: Option<String>,
|
||||
pub base_url: Option<String>,
|
||||
pub sitemap: Option<String>,
|
||||
pub data: Option<liquid::value::Object>,
|
||||
pub data: Option<liquid_value::Object>,
|
||||
#[serde(skip)]
|
||||
pub data_dir: &'static str,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue