Add robots.txt.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 05 Aug 2016 12:44:42 +0300
changeset 80 9a1292a6be3e
parent 79 a0f224c26f08
child 81 129d6a9579b9
Add robots.txt.
Makefile
www/robots.txt
--- a/Makefile	Thu Aug 04 15:31:15 2016 +0300
+++ b/Makefile	Fri Aug 05 12:44:42 2016 +0300
@@ -96,7 +96,7 @@
 all:
 
 .PHONY: www
-www: html $(HTML_DIR)/sitemap.xml
+www: html $(HTML_DIR)/sitemap.xml $(HTML_DIR)/robots.txt
 
 .PHONY: html
 html: $(HTML_FILES)
@@ -121,7 +121,7 @@
 echo '</body></html>'; \
 } >$@
 
-$(HTML_DIR)/rst.tmpl: www/rst.tmpl $(MAKEFILE_LIST)
+$(HTML_DIR)/rst.tmpl: www/rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR)
 	sed -e "s|{date}|$$(date +%F)|" -e "s|{rev}|$$(hg id -i)|"  <$< >$@
 
 $(HTML_DIR)/index.html: $(HTML_DIR)/README.html $(MAKEFILE_LIST) | $(HTML_DIR)
@@ -154,7 +154,7 @@
 for f in *.rst; do echo ".. include:: ../$$f"; done; \
 } >$@
 
-$(HTML_DIR)/sitemap.xml: $(RST_FILES) $(MAKEFILE_LIST)
+$(HTML_DIR)/sitemap.xml: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
 	{ \
 echo '<?xml version="1.0" encoding="UTF-8"?>'; \
 echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; \
@@ -167,6 +167,9 @@
 echo '</urlset>'; \
 } >$@
 
+$(HTML_DIR)/robots.txt: www/robots.txt $(MAKEFILE_LIST) | $(HTML_DIR)
+	cp $< $@
+
 ################################################################
 # Init targets.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/robots.txt	Fri Aug 05 12:44:42 2016 +0300
@@ -0,0 +1,6 @@
+User-agent: *
+Disallow:
+Allow: /
+
+Sitemap: http://tips.defun.work/sitemap.xml
+Host: tips.defun.work