diff --git a/Cargo.lock b/Cargo.lock
index ad7144b..f2d6d6b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -250,6 +250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/components/content/Cargo.toml b/components/content/Cargo.toml
index ca8cffe..fffe860 100644
--- a/components/content/Cargo.toml
+++ b/components/content/Cargo.toml
@@ -8,7 +8,7 @@ tera = "0.11"
serde = "1"
slug = "0.1"
rayon = "1"
-chrono = "0.4"
+chrono = { version = "0.4", features = ["serde"] }
errors = { path = "../errors" }
config = { path = "../config" }
diff --git a/components/content/src/page.rs b/components/content/src/page.rs
index 9be00d5..e9fd5ac 100644
--- a/components/content/src/page.rs
+++ b/components/content/src/page.rs
@@ -3,7 +3,6 @@ use std::collections::HashMap;
use std::path::{Path, PathBuf};
use std::result::Result as StdResult;
-use chrono::Datelike;
use tera::{Tera, Context as TeraContext};
use serde::ser::{SerializeStruct, self};
use slug::slugify;
@@ -263,11 +262,10 @@ impl ser::Serialize for Page {
state.serialize_field("title", &self.meta.title)?;
state.serialize_field("description", &self.meta.description)?;
state.serialize_field("date", &self.meta.date)?;
- if let Some(chrono_datetime) = self.meta.date() {
- let d = chrono_datetime.date();
- state.serialize_field("year", &d.year())?;
- state.serialize_field("month", &d.month())?;
- state.serialize_field("day", &d.day())?;
+ if let Some(d) = self.meta.datetime_tuple {
+ state.serialize_field("year", &d.0)?;
+ state.serialize_field("month", &d.1)?;
+ state.serialize_field("day", &d.2)?;
} else {
state.serialize_field::