|
|
@@ -30,6 +30,7 @@ pub struct SerializingPage<'a> { |
|
|
|
toc: &'a [Header], |
|
|
|
assets: &'a [String], |
|
|
|
draft: bool, |
|
|
|
lang: &'a Option<String>, |
|
|
|
lighter: Option<Box<SerializingPage<'a>>>, |
|
|
|
heavier: Option<Box<SerializingPage<'a>>>, |
|
|
|
earlier: Option<Box<SerializingPage<'a>>>, |
|
|
@@ -88,6 +89,7 @@ impl<'a> SerializingPage<'a> { |
|
|
|
toc: &page.toc, |
|
|
|
assets: &page.serialized_assets, |
|
|
|
draft: page.is_draft(), |
|
|
|
lang: &page.lang, |
|
|
|
lighter, |
|
|
|
heavier, |
|
|
|
earlier, |
|
|
@@ -136,6 +138,7 @@ impl<'a> SerializingPage<'a> { |
|
|
|
toc: &page.toc, |
|
|
|
assets: &page.serialized_assets, |
|
|
|
draft: page.is_draft(), |
|
|
|
lang: &page.lang, |
|
|
|
lighter: None, |
|
|
|
heavier: None, |
|
|
|
earlier: None, |
|
|
@@ -157,6 +160,7 @@ pub struct SerializingSection<'a> { |
|
|
|
components: &'a [String], |
|
|
|
word_count: Option<usize>, |
|
|
|
reading_time: Option<usize>, |
|
|
|
lang: &'a Option<String>, |
|
|
|
toc: &'a [Header], |
|
|
|
assets: &'a [String], |
|
|
|
pages: Vec<SerializingPage<'a>>, |
|
|
@@ -196,6 +200,7 @@ impl<'a> SerializingSection<'a> { |
|
|
|
reading_time: section.reading_time, |
|
|
|
toc: §ion.toc, |
|
|
|
assets: §ion.serialized_assets, |
|
|
|
lang: §ion.lang, |
|
|
|
pages, |
|
|
|
subsections, |
|
|
|
} |
|
|
@@ -227,6 +232,7 @@ impl<'a> SerializingSection<'a> { |
|
|
|
reading_time: section.reading_time, |
|
|
|
toc: §ion.toc, |
|
|
|
assets: §ion.serialized_assets, |
|
|
|
lang: §ion.lang, |
|
|
|
pages: vec![], |
|
|
|
subsections: vec![], |
|
|
|
} |
|
|
|