diff options
| author | Fuwn <[email protected]> | 2022-04-14 18:48:19 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-14 18:48:19 -0700 |
| commit | f60823c3f593bfbf4a00d16e794d4e47d82da9c2 (patch) | |
| tree | 98c77ab90c19ac18818eb1a6bfba5c163797eb9b /src/macros.rs | |
| parent | feat: sitemap (diff) | |
| download | locus-f60823c3f593bfbf4a00d16e794d4e47d82da9c2.tar.xz locus-f60823c3f593bfbf4a00d16e794d4e47d82da9c2.zip | |
feat: descriptions for sitemap
Diffstat (limited to 'src/macros.rs')
| -rw-r--r-- | src/macros.rs | 10 |
1 files changed, 6 insertions, 4 deletions
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, |