From 627eadf4871dbba2a506bd9a1327b89f161405b6 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 5 Sep 2024 06:53:51 -0700 Subject: feat(sitemap): rename to directory --- content/static/index.gmi | 4 ++-- content/templates/partials/footer.hbs | 2 +- content/unused/blogs/news/20220820.gmi | 4 ++-- src/modules.rs | 2 +- src/modules/directory.rs | 21 +++++++++++++++++++++ src/modules/sitemap.rs | 21 --------------------- 6 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 src/modules/directory.rs delete mode 100644 src/modules/sitemap.rs diff --git a/content/static/index.gmi b/content/static/index.gmi index 6292c0a..8e119cf 100644 --- a/content/static/index.gmi +++ b/content/static/index.gmi @@ -8,9 +8,9 @@ I write a lot of software and tooling for the Gemini protocol, the backbone of t => https://github.com/gemrest GemRest (GitHub) -Don't know where to start? Check out the sitemap or test your luck! +Don't know where to start? Check out the directory or test your luck! -=> /sitemap Sitemap +=> /directory Directory => /random I'm Feeling Lucky This index page is getting long, so I've truncated it. You can check out the rest at index #2. diff --git a/content/templates/partials/footer.hbs b/content/templates/partials/footer.hbs index 0808d4c..fcdbcf2 100644 --- a/content/templates/partials/footer.hbs +++ b/content/templates/partials/footer.hbs @@ -8,7 +8,7 @@ => /search Search => /web Web-to-Gemini Gateway => /finger Finger Gateway -=> /sitemap Sitemap +=> /directory Directory => /useful Useful Links ## Footer diff --git a/content/unused/blogs/news/20220820.gmi b/content/unused/blogs/news/20220820.gmi index af97d4d..c1d3008 100644 --- a/content/unused/blogs/news/20220820.gmi +++ b/content/unused/blogs/news/20220820.gmi @@ -1,3 +1,3 @@ * Moved the readability disclaimer to its own page -* Added links to the news sub-blog, the sitemap page, and the readability disclaimer onto the front page -* Added a description to the sitemap page \ No newline at end of file +* Added links to the news sub-blog, the directory page, and the readability disclaimer onto the front page +* Added a description to the directory page \ No newline at end of file diff --git a/src/modules.rs b/src/modules.rs index cb07e82..9551f0c 100644 --- a/src/modules.rs +++ b/src/modules.rs @@ -1,6 +1,6 @@ amenadiel::modules!( uptime, - sitemap, + directory, search, remarks, blog, diff --git a/src/modules/directory.rs b/src/modules/directory.rs new file mode 100644 index 0000000..9eddc31 --- /dev/null +++ b/src/modules/directory.rs @@ -0,0 +1,21 @@ +pub fn module(router: &mut windmark::router::Router) { + crate::route::track_mount( + router, + "/directory", + "A map of all publicly available routes on this Gemini capsule", + |context| { + crate::response::success( + &format!( + "# Directory\n\nA map of all publicly available routes on this \ + Gemini capsule\n\n{}", + (*crate::route::ROUTES.lock().unwrap()) + .iter() + .map(|(r, d)| format!("=> {} {}", r, d.description)) + .collect::>() + .join("\n") + ), + &context, + ) + }, + ); +} diff --git a/src/modules/sitemap.rs b/src/modules/sitemap.rs deleted file mode 100644 index 0f88ef4..0000000 --- a/src/modules/sitemap.rs +++ /dev/null @@ -1,21 +0,0 @@ -pub fn module(router: &mut windmark::router::Router) { - crate::route::track_mount( - router, - "/sitemap", - "A map of all publicly available routes on this Gemini capsule", - |context| { - crate::response::success( - &format!( - "# Sitemap\n\nA map of all publicly available routes on this Gemini \ - capsule\n\n{}", - (*crate::route::ROUTES.lock().unwrap()) - .iter() - .map(|(r, d)| format!("=> {} {}", r, d.description)) - .collect::>() - .join("\n") - ), - &context, - ) - }, - ); -} -- cgit v1.2.3