-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
164 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,13 @@ | |
|
||
## Maintainer Contact | ||
|
||
* Will Rossiter (Nickname: wrossiter, willr) <[email protected]> | ||
- Will Rossiter (Nickname: wrossiter, willr) <[email protected]> | ||
|
||
## Installation | ||
|
||
> composer require "wilr/silverstripe-googlesitemaps" | ||
If you're using Silverstripe 5 then version 3 or `dev-main` will work. | ||
If you're using Silverstripe 5 then version `3` or `dev-main` will work. | ||
|
||
For Silverstripe 4 use the `2.x` branch line. | ||
|
||
|
@@ -34,4 +34,4 @@ See docs/en for more information about configuring the module. | |
|
||
## Troubleshooting | ||
|
||
* Flush this route to ensure the changes take effect (e.g http://yoursite.com/sitemap.xml?flush=1) | ||
- Flush this route to ensure the changes take effect (e.g http://yoursite.com/sitemap.xml?flush=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
use SilverStripe\Core\ClassInfo; | ||
use Wilr\GoogleSitemaps\GoogleSitemap; | ||
|
||
if (0 === strpos(ltrim($_SERVER['REQUEST_URI'], '/'), 'sitemap')) { | ||
foreach (ClassInfo::implementorsOf(Sitemapable::class) as $className) { | ||
GoogleSitemap::register_dataobject($className); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
|
||
namespace Wilr\GoogleSitemaps; | ||
|
||
interface Sitemapable | ||
{ | ||
/** | ||
* Return the absolute URL for this object | ||
* | ||
* @return string | ||
*/ | ||
public function AbsoluteLink(); | ||
} |
Oops, something went wrong.