robots.txt
This commit is contained in:
1 parent
2d9d19d5cd
commit
bc20005a87
3 files changed
+6
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user