summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-04-12 14:32:01 -0400
committerEvan Prodromou <evan@status.net>2010-06-01 13:52:27 -0700
commit1c858e17eaf0e9509b7e165ea1b0d45f7e923361 (patch)
tree9eb053e5ddce0a2374eef47a7a9e928a03d3eb0a
parente363b724b96d0509e56edabcb7fb199698e158b7 (diff)
add sitemap statement to robots.txt
-rw-r--r--plugins/Sitemap/SitemapPlugin.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/Sitemap/SitemapPlugin.php b/plugins/Sitemap/SitemapPlugin.php
index ed876d94f..6fc702104 100644
--- a/plugins/Sitemap/SitemapPlugin.php
+++ b/plugins/Sitemap/SitemapPlugin.php
@@ -77,6 +77,23 @@ class SitemapPlugin extends Plugin
}
/**
+ * Add sitemap-related information at the end of robots.txt
+ *
+ * @param Action $action Action being run
+ *
+ * @return boolean hook value.
+ */
+
+ function onEndRobotsTxt($action)
+ {
+ $url = common_local_url('sitemapindex');
+
+ print "\nSitemap: $url\n";
+
+ return true;
+ }
+
+ /**
* Map URLs to actions
*
* @param Net_URL_Mapper $m path-to-action mapper