meow
Some checks are pending
test / test (push) Waiting to run

This commit is contained in:
nora 2025-10-04 16:40:35 +02:00
parent 9dc632b657
commit 98a0527981
4 changed files with 33 additions and 20 deletions

View file

@ -1,6 +1,6 @@
//! Root index.html and some other static stuff
use std::path::Path;
use std::{cmp::Reverse, path::Path};
use color_eyre::{eyre::WrapErr, Result};
@ -14,7 +14,13 @@ pub fn build(
) -> Result<()> {
let mut context = tera::Context::new();
context.insert("talks", &config.talks);
let mut talks = config
.talks
.iter()
.filter(|talk| talk.hidden != Some(true))
.collect::<Vec<_>>();
talks.sort_by_cached_key(|talk| Reverse(talk.date.clone()));
context.insert("talks", &talks);
utils::copy_fn(&statics.join("root"), dist, |content, ext, _opts| {
if ext.is_some_and(|ext| matches!(ext, "html" | "css")) {

View file

@ -38,6 +38,7 @@ struct Talk {
location: String,
#[serde(skip_deserializing)]
dir_name: String,
hidden: Option<bool>,
}
impl Talk {