From f60823c3f593bfbf4a00d16e794d4e47d82da9c2 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 14 Apr 2022 18:48:19 -0700 Subject: feat: descriptions for sitemap --- src/macros.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/macros.rs') diff --git a/src/macros.rs b/src/macros.rs index 997f7d5..fe1f20b 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -18,8 +18,9 @@ #[macro_export] macro_rules! mount_page { - ($router:ident, $at:literal, $file:literal) => { - (*crate::ROUTES.lock().unwrap()).push($at.to_string()); + ($router:ident, $at:literal, $description:literal, $file:literal) => { + (*crate::ROUTES.lock().unwrap()) + .insert($at.to_string(), $description.to_string()); ($router).mount( $at, @@ -46,8 +47,9 @@ macro_rules! mount_page { #[macro_export] macro_rules! mount_file { - ($router:ident, $at:literal, $file:literal) => { - (*crate::ROUTES.lock().unwrap()).push($at.to_string()); + ($router:ident, $at:literal, $description:literal, $file:literal) => { + (*crate::ROUTES.lock().unwrap()) + .insert($at.to_string(), $description.to_string()); ($router).mount( $at, -- cgit v1.2.3