mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 11:05:31 +02:00
Add nofollow to RSS links to avoid bots crawling the feeds.
This commit is contained in:
parent
d1dcd2bf3c
commit
3a13a46a2d
@ -95,7 +95,12 @@ class VersionFeed_Controller extends Extension {
|
|||||||
|
|
||||||
function linkToAllSiteRSSFeed() {
|
function linkToAllSiteRSSFeed() {
|
||||||
// RSS feed to all-site changes.
|
// RSS feed to all-site changes.
|
||||||
RSSFeed::linkToFeed($this->owner->getSiteRSSLink(), $this->linkToAllSitesRSSFeedTitle());
|
$title = Convert::raw2xml($this->linkToAllSitesRSSFeedTitle());
|
||||||
|
$url = $this->owner->getSiteRSSLink();
|
||||||
|
|
||||||
|
Requirements::insertHeadTags(
|
||||||
|
'<link rel="alternate nofollow" type="application/rss+xml" title="' . $title .
|
||||||
|
'" href="' . $url . '" />');
|
||||||
}
|
}
|
||||||
|
|
||||||
function linkToAllSitesRSSFeedTitle() {
|
function linkToAllSitesRSSFeedTitle() {
|
||||||
|
Loading…
Reference in New Issue
Block a user