This commit is contained in:
2025-11-11 23:46:10 -08:00
parent d5067ff381
commit 6493476565
3 changed files with 3 additions and 5 deletions

View File

@@ -93,9 +93,7 @@ impl Default for Page {
fn default() -> Self { fn default() -> Self {
Page { Page {
meta: Default::default(), meta: Default::default(),
html_ttl: Some(TimeDelta::seconds(60 * 60 * 24 * 30)), html_ttl: Some(TimeDelta::days(1)),
//css_ttl: Duration::from_secs(60 * 60 * 24 * 30),
//generate_css: None,
generate_html: Box::new(|_, _| Box::pin(async { html!() })), generate_html: Box::new(|_, _| Box::pin(async { html!() })),
immutable: true, immutable: true,
} }

View File

@@ -62,7 +62,7 @@ impl Servable for Default404 {
return Rendered { return Rendered {
code: StatusCode::NOT_FOUND, code: StatusCode::NOT_FOUND,
body: RenderedBody::String("page not found".into()), body: RenderedBody::String("page not found".into()),
ttl: Some(TimeDelta::days(30)), ttl: Some(TimeDelta::days(1)),
immutable: true, immutable: true,
headers: HeaderMap::new(), headers: HeaderMap::new(),
mime: Some(MimeType::Html), mime: Some(MimeType::Html),

View File

@@ -69,7 +69,7 @@ fn page_from_markdown(md: impl Into<String>, default_image: Option<String>) -> P
meta, meta,
immutable: true, immutable: true,
html_ttl: Some(TimeDelta::seconds(60 * 24 * 30)), html_ttl: Some(TimeDelta::days(1)),
generate_html: Box::new(move |page, ctx| { generate_html: Box::new(move |page, ctx| {
let html = html.clone(); let html = html.clone();