@@ -7,39 +7,39 @@ |
||
| 7 | 7 | use Thepixeldeveloper\Sitemap\Urlset; |
| 8 | 8 | |
| 9 | 9 | $entryArray = [ |
| 10 | - [ |
|
| 11 | - 'path' => '/', |
|
| 12 | - 'lastmod' => new DateTime('first day of this month'), |
|
| 13 | - 'changefreq' => 'month', |
|
| 14 | - 'priority' => 1, |
|
| 15 | - ], |
|
| 16 | - [ |
|
| 17 | - 'path' => '/terms/', |
|
| 18 | - 'lastmod' => new DateTime('first day of this month'), |
|
| 19 | - 'changefreq' => 'month', |
|
| 20 | - 'priority' => .3, |
|
| 21 | - ], |
|
| 22 | - [ |
|
| 23 | - 'path' => '/change-log/', |
|
| 24 | - 'lastmod' => new DateTime('first day of this week'), |
|
| 25 | - 'changefreq' => 'weekly', |
|
| 26 | - 'priority' => .1, |
|
| 27 | - ], |
|
| 28 | - [ |
|
| 29 | - 'path' => '/contact/', |
|
| 30 | - 'lastmod' => new DateTime('first day of this year'), |
|
| 31 | - 'changefreq' => 'yearly', |
|
| 32 | - 'priority' => .6, |
|
| 33 | - ], |
|
| 10 | + [ |
|
| 11 | + 'path' => '/', |
|
| 12 | + 'lastmod' => new DateTime('first day of this month'), |
|
| 13 | + 'changefreq' => 'month', |
|
| 14 | + 'priority' => 1, |
|
| 15 | + ], |
|
| 16 | + [ |
|
| 17 | + 'path' => '/terms/', |
|
| 18 | + 'lastmod' => new DateTime('first day of this month'), |
|
| 19 | + 'changefreq' => 'month', |
|
| 20 | + 'priority' => .3, |
|
| 21 | + ], |
|
| 22 | + [ |
|
| 23 | + 'path' => '/change-log/', |
|
| 24 | + 'lastmod' => new DateTime('first day of this week'), |
|
| 25 | + 'changefreq' => 'weekly', |
|
| 26 | + 'priority' => .1, |
|
| 27 | + ], |
|
| 28 | + [ |
|
| 29 | + 'path' => '/contact/', |
|
| 30 | + 'lastmod' => new DateTime('first day of this year'), |
|
| 31 | + 'changefreq' => 'yearly', |
|
| 32 | + 'priority' => .6, |
|
| 33 | + ], |
|
| 34 | 34 | ]; |
| 35 | 35 | |
| 36 | 36 | $urlSet = new Urlset(); |
| 37 | 37 | foreach ($entryArray as $entry) { |
| 38 | - $url = new Url('http://site.jacobemerick.com' . $entry['path']); |
|
| 39 | - $url->setLastMod($entry['lastmod']->format('c')); |
|
| 40 | - $url->setChangeFreq($entry['changefreq']); |
|
| 41 | - $url->setPriority($entry['priority']); |
|
| 42 | - $urlSet->addUrl($url); |
|
| 38 | + $url = new Url('http://site.jacobemerick.com' . $entry['path']); |
|
| 39 | + $url->setLastMod($entry['lastmod']->format('c')); |
|
| 40 | + $url->setChangeFreq($entry['changefreq']); |
|
| 41 | + $url->setPriority($entry['priority']); |
|
| 42 | + $urlSet->addUrl($url); |
|
| 43 | 43 | } |
| 44 | 44 | $output = new Output(); |
| 45 | 45 | $output->setIndentString(' '); |