use std::{collections::HashMap, sync::LazyLock}; type ContactMap = HashMap>; static CONTACT_MAP: LazyLock = LazyLock::new(|| { serde_json::from_str(include_str!("../../content/json/contacts.json")) .unwrap() }); pub fn module(router: &mut windmark::router::Router) { let mut contacts = CONTACT_MAP .iter() .map(|(category, contacts)| { format!("## {}\n\n{}", category, { let mut contacts = contacts .iter() .map(|(tag, href)| { if href.is_empty() { tag.to_string() } else { format!("=> {href} {tag}") } }) .collect::>(); contacts.sort(); contacts.join("\n") }) }) .collect::>(); contacts.sort(); crate::route::track_mount( router, "/contact", "A Few Skills of Fuwn", move |context| { crate::response::success( &format!("# Contact\n\n{}", contacts.join("\n")), &context, ) }, ); }