Skip to content

Commit

Permalink
robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub committed Oct 23, 2023
1 parent 80c7e13 commit b2b637b
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 46 deletions.
127 changes: 83 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/controller/inn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ pub(crate) async fn mod_inn_post(
// remove the old inn name
if input.inn_name != inn.inn_name {
let old_inn_name_key = inn.inn_name.replace(' ', "_").to_lowercase();
inn_names_tree.remove(&old_inn_name_key)?;
inn_names_tree.remove(old_inn_name_key)?;
}

// remove the old inn topics
Expand Down
2 changes: 1 addition & 1 deletion src/controller/meta_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pub(crate) async fn style() -> (HeaderMap, &'static str) {
}

pub(crate) async fn robots() -> &'static str {
"User-agent: *\nDisallow: /search"
include_str!("../../static/robots.txt")
}

pub async fn shutdown_signal() {
Expand Down
25 changes: 25 additions & 0 deletions static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
User-agent: *
Disallow: /admin
Disallow: /mod
Disallow: /preview

User-agent: MJ12Bot
Disallow: /

User-agent: PetalBot
Disallow: /

User-agent: AspiegelBot
Disallow: /

User-agent: AhrefsBot
Disallow: /

User-agent: SEMrushBot
Disallow: /

User-agent: DotBot
Disallow: /

User-agent: MauiBot
Disallow: /

0 comments on commit b2b637b

Please sign in to comment.