Skip to content

Commit c24ac15

Browse files
committed
robots label
1 parent e7a9788 commit c24ac15

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎stubbornjava-webapp/src/main/java/com/stubbornjava/webapp/PageRoutes.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public static void home(HttpServerExchange exchange) {
6666
Exchange.body().sendHtmlTemplate(exchange, "templates/src/pages/home", response);
6767
}
6868

69+
// {{start:robots}}
6970
public static void robots(HttpServerExchange exchange) {
7071
String host = Exchange.urls().host(exchange).toString();
7172
List<String> sitemaps = StubbornJavaSitemapGenerator.getSitemap().getIndexNames();
@@ -74,6 +75,7 @@ public static void robots(HttpServerExchange exchange) {
7475
.with("host", host);
7576
Exchange.body().sendText(exchange, Templating.instance().renderTemplate("templates/src/pages/robots.txt", response));
7677
}
78+
// {{end:robots}}
7779

7880
public static void notFound(HttpServerExchange exchange) {
7981
exchange.setStatusCode(404);

0 commit comments

Comments
 (0)