use std::{collections::HashMap, sync::LazyLock}; type InterestMap = HashMap>; static INTEREST_MAP: LazyLock = LazyLock::new(|| { serde_json::from_str(include_str!("../../content/json/interests.json")) .unwrap() }); pub fn module(router: &mut windmark::router::Router) { let mut contacts = INTEREST_MAP .iter() .map(|(category, contacts)| { format!("## {}\n\n{}", category, { let mut contacts = contacts .iter() .map(|(tag, href)| format!("=> {href} {tag}")) .collect::>(); contacts.sort(); contacts.join("\n") }) }) .collect::>(); contacts.sort(); crate::route::track_mount( router, "/interests", "A Few Interests of Fuwn", move |context| { crate::response::success( &format!( "# Interests\n\nA collection of things that I think are pretty neat \ and I am considering using more in the future.\n\n{}", contacts.join("\n") ), &context, ) }, ); }