forward bibliography

This commit is contained in:
Maciej Jur 2024-10-01 19:59:55 +02:00
parent 1273a77f61
commit be2963d931
Signed by: kamov
GPG key ID: 191CBFF5F72ECAFD
2 changed files with 13 additions and 13 deletions

View file

@ -99,8 +99,9 @@ fn main() {
sack.get_content_list::<Post>("posts/**/*")
.into_iter()
.map(|query| {
let bibliography = sack.get_library(query.area);
let (parsed, outline, bib) =
html::post::parse_content(query.content, &sack, query.area, None);
html::post::parse_content(query.content, &sack, query.area, bibliography);
let out_buff = html::post::as_html(query.meta, &parsed, &sack, outline, bib);
(query.slug.join("index.html"), out_buff)
})
@ -124,8 +125,9 @@ fn main() {
sack.get_content_list::<Wiki>("**/*")
.into_iter()
.map(|query| {
let bibliography = sack.get_library(query.area);
let (parsed, outline, bib) =
html::wiki::parse_content(query.content, &sack, query.area, None);
html::wiki::parse_content(query.content, &sack, query.area, bibliography);
let out_buff =
html::wiki::as_html(query.meta, &parsed, &sack, query.slug, outline, bib);
(query.slug.join("index.html"), out_buff)
@ -151,6 +153,15 @@ fn main() {
let (parsed, _, _) = text::md::parse(&data, &sack, "".into(), None);
vec![("index.html".into(), crate::html::home(&sack, &parsed))]
})
.add_task(|sack| {
let query = sack.get_content("projects/flox").unwrap();
let (parsed, outline, bib) =
html::post::parse_content(query.content, &sack, query.area, None);
let out_buff = html::as_html(query.meta, &parsed, &sack, outline, bib);
vec![(query.slug.join("index.html"), out_buff)]
})
// Task: generate project index
.add_task(|sack| {
vec![(

View file

@ -31,17 +31,6 @@ mod isodate {
use chrono::{DateTime, Utc};
use serde::{self, Deserialize, Deserializer};
// pub fn serialize<S>(
// date: &DateTime<Utc>,
// serializer: S,
// ) -> Result<S::Ok, S::Error>
// where
// S: Serializer,
// {
// let s = date.to_rfc3339();
// serializer.serialize_str(&s)
// }
pub(crate) fn deserialize<'de, D>(deserializer: D) -> Result<DateTime<Utc>, D::Error>
where
D: Deserializer<'de>,