robots.txt

This commit is contained in:
Pantonshire committed 2022-05-27 14:16:09 +01:00
1 parent 2d9d19d5cd
commit bc20005a87
3 files changed
+6

No files matched your search

+2
View File
@@ -29,6 +29,8 @@ pub struct Config {
#[knuffel(child, unwrap(argument))]
favicon_dir: PathBuf,
#[knuffel(child, unwrap(argument))]
robots_path: PathBuf,
#[knuffel(child, unwrap(argument))]
posts_dir: PathBuf,
#[knuffel(child, unwrap(argument))]
post_media_dir: PathBuf,
+1
View File
@@ -38,6 +38,7 @@ pub fn service(
.route("/rss.xml", get(rss::handle))
.route("/atom.xml", get(atom::handle))
.route("/articles/:post_id", get(post::handle))
.route("/robots.txt", static_content::file_service(&config.robots_path, None))
.route("/favicon.ico", static_content::file_service(&config.favicon_dir.join("favicon.ico"), None))
.route("/favicon-16x16.png", static_content::file_service(&config.favicon_dir.join("favicon-16x16.png"), None))
.route("/favicon-32x32.png", static_content::file_service(&config.favicon_dir.join("favicon-32x32.png"), None))
+3
View File
@@ -0,0 +1,3 @@
User-agent: *
Disallow: /static/
Disallow: /article_media/