robots.txt

main
Pantonshire 4 years ago
parent 2d9d19d5cd
commit bc20005a87

@ -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,

@ -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))

@ -0,0 +1,3 @@
User-agent: *
Disallow: /static/
Disallow: /article_media/
Loading…
Cancel
Save