diff --git a/README.md b/README.md index dbf850e..13f25db 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This package allows you to manage and generate a sitemap without you having to a * Easy setup & configuration. * Well documented & IDE Friendly. * Well tested with maximum code quality. - * Laravel `5.4` to `6.x` are supported. + * Laravel `5.4` to `7.x` are supported. * Made with :heart: & :coffee:. ## Table of contents @@ -41,7 +41,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail. - [ARCANEDEV][link-author] - [All Contributors][link-contributors] -[badge_laravel]: https://img.shields.io/badge/Laravel-5.4%20to%206.x-orange.svg?style=flat-square +[badge_laravel]: https://img.shields.io/badge/Laravel-5.4%20to%207.x-orange.svg?style=flat-square [badge_license]: https://img.shields.io/packagist/l/arcanedev/laravel-sitemap.svg?style=flat-square [badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/LaravelSitemap/run-tests?style=flat-square [badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LaravelSitemap.svg?style=flat-square diff --git a/_docs/0-Home.md b/_docs/0-Home.md index b6d8c7b..21e7e1f 100644 --- a/_docs/0-Home.md +++ b/_docs/0-Home.md @@ -5,7 +5,7 @@ This package allows you to manage and generate a sitemap without you having to a ### Features * Easy setup & configuration. - * Laravel `5.4` to `6.x` are supported. + * Laravel `5.4` to `7.x` are supported. * SEO-Friendly (Search engine optimization). * Respects the [sitemaps.org](https://www.sitemaps.org/protocol.html) schemas. * Multiple URLs & Sitemaps management. diff --git a/_docs/1-Installation-and-Setup.md b/_docs/1-Installation-and-Setup.md index 8f8a22c..57e8f80 100644 --- a/_docs/1-Installation-and-Setup.md +++ b/_docs/1-Installation-and-Setup.md @@ -10,26 +10,29 @@ | Laravel Sitemap | Laravel | |:-------------------------------------------------|:-----------------------------| -| ![Laravel Sitemap v1.0.x][laravel_sitemap_1_0_x] | ![Laravel v5.4][laravel_5_4] | -| ![Laravel Sitemap v1.1.x][laravel_sitemap_1_1_x] | ![Laravel v5.5][laravel_5_5] | -| ![Laravel Sitemap v1.2.x][laravel_sitemap_1_2_x] | ![Laravel v5.6][laravel_5_6] | -| ![Laravel Sitemap v1.3.x][laravel_sitemap_1_3_x] | ![Laravel v5.7][laravel_5_7] | -| ![Laravel Sitemap v1.4.x][laravel_sitemap_1_4_x] | ![Laravel v5.8][laravel_5_8] | +| ![Laravel Sitemap v3.x][laravel_sitemap_3_x] | ![Laravel v7.x][laravel_7_x] | | ![Laravel Sitemap v2.x][laravel_sitemap_2_x] | ![Laravel v6.x][laravel_6_x] | +| ![Laravel Sitemap v1.4.x][laravel_sitemap_1_4_x] | ![Laravel v5.8][laravel_5_8] | +| ![Laravel Sitemap v1.3.x][laravel_sitemap_1_3_x] | ![Laravel v5.7][laravel_5_7] | +| ![Laravel Sitemap v1.2.x][laravel_sitemap_1_2_x] | ![Laravel v5.6][laravel_5_6] | +| ![Laravel Sitemap v1.1.x][laravel_sitemap_1_1_x] | ![Laravel v5.5][laravel_5_5] | +| ![Laravel Sitemap v1.0.x][laravel_sitemap_1_0_x] | ![Laravel v5.4][laravel_5_4] | -[laravel_5_4]: https://img.shields.io/badge/v5.4-supported-brightgreen.svg?style=flat-square "Laravel v5.4" -[laravel_5_5]: https://img.shields.io/badge/v5.5-supported-brightgreen.svg?style=flat-square "Laravel v5.5" -[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6" -[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7" -[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8" +[laravel_7_x]: https://img.shields.io/badge/v7.x-supported-brightgreen.svg?style=flat-square "Laravel v7.0" [laravel_6_x]: https://img.shields.io/badge/v6.x-supported-brightgreen.svg?style=flat-square "Laravel v6.0" +[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8" +[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7" +[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6" +[laravel_5_5]: https://img.shields.io/badge/v5.5-supported-brightgreen.svg?style=flat-square "Laravel v5.5" +[laravel_5_4]: https://img.shields.io/badge/v5.4-supported-brightgreen.svg?style=flat-square "Laravel v5.4" -[laravel_sitemap_1_0_x]: https://img.shields.io/badge/version-1.0.x-blue.svg?style=flat-square "Laravel Sitemap v1.0.x" -[laravel_sitemap_1_1_x]: https://img.shields.io/badge/version-1.1.x-blue.svg?style=flat-square "Laravel Sitemap v1.1.x" -[laravel_sitemap_1_2_x]: https://img.shields.io/badge/version-1.2.x-blue.svg?style=flat-square "Laravel Sitemap v1.2.x" -[laravel_sitemap_1_3_x]: https://img.shields.io/badge/version-1.3.x-blue.svg?style=flat-square "Laravel Sitemap v1.3.x" -[laravel_sitemap_1_4_x]: https://img.shields.io/badge/version-1.4.x-blue.svg?style=flat-square "Laravel Sitemap v1.4.x" +[laravel_sitemap_3_x]: https://img.shields.io/badge/version-3.x-blue.svg?style=flat-square "Laravel Sitemap v3.x" [laravel_sitemap_2_x]: https://img.shields.io/badge/version-2.x-blue.svg?style=flat-square "Laravel Sitemap v2.x" +[laravel_sitemap_1_4_x]: https://img.shields.io/badge/version-1.4.x-blue.svg?style=flat-square "Laravel Sitemap v1.4.x" +[laravel_sitemap_1_3_x]: https://img.shields.io/badge/version-1.3.x-blue.svg?style=flat-square "Laravel Sitemap v1.3.x" +[laravel_sitemap_1_2_x]: https://img.shields.io/badge/version-1.2.x-blue.svg?style=flat-square "Laravel Sitemap v1.2.x" +[laravel_sitemap_1_1_x]: https://img.shields.io/badge/version-1.1.x-blue.svg?style=flat-square "Laravel Sitemap v1.1.x" +[laravel_sitemap_1_0_x]: https://img.shields.io/badge/version-1.0.x-blue.svg?style=flat-square "Laravel Sitemap v1.0.x" ## Composer diff --git a/composer.json b/composer.json index aa2416e..5179383 100644 --- a/composer.json +++ b/composer.json @@ -14,16 +14,15 @@ "type": "library", "license": "MIT", "require": { - "php": ">=7.2.0", + "php": "^7.2.5", "ext-dom": "*", "ext-json": "*", - "arcanedev/support": "^5.1.1" + "arcanedev/support": "^7.0" }, "require-dev": { - "orchestra/testbench": "^4.0", - "phpunit/phpcov": "^6.0", - "phpunit/phpunit": "^8.0", - "spatie/phpunit-snapshot-assertions": "^2.1" + "orchestra/testbench": "^5.0", + "phpunit/phpunit": "^8.5|^9.0", + "spatie/phpunit-snapshot-assertions": "^3.0|^4.0" }, "autoload": { "psr-4": { @@ -42,5 +41,7 @@ "Arcanedev\\LaravelSitemap\\LaravelSitemapServiceProvider" ] } - } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/src/LaravelSitemapServiceProvider.php b/src/LaravelSitemapServiceProvider.php index 97985ac..5a25860 100644 --- a/src/LaravelSitemapServiceProvider.php +++ b/src/LaravelSitemapServiceProvider.php @@ -51,9 +51,14 @@ public function register(): void */ public function boot(): void { - $this->publishConfig(); - $this->publishViews(); - $this->publishTranslations(); + $this->loadTranslations(); + $this->loadViews(); + + if ($this->app->runningInConsole()) { + $this->publishConfig(); + $this->publishTranslations(); + $this->publishViews(); + } } /** diff --git a/src/SitemapManager.php b/src/SitemapManager.php index 6641ac2..b3b9f0b 100644 --- a/src/SitemapManager.php +++ b/src/SitemapManager.php @@ -267,7 +267,7 @@ private function saveMultiple(string $path, SitemapContract $sitemap) foreach ($chunks as $key => $item) { file_put_contents( - $pathInfo['dirname'].DS.$pathInfo['filename'].'-'.$key.'.'.$pathInfo['extension'], + $pathInfo['dirname'].DIRECTORY_SEPARATOR.$pathInfo['filename'].'-'.$key.'.'.$pathInfo['extension'], SitemapBuilder::make()->build((string) $key, $chunks, $this->format) ); } diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__1.txt b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__1.txt new file mode 100644 index 0000000..bcdf789 --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__1.txt @@ -0,0 +1,5 @@ +http://example.com/sitemap-blog-1.xml +http://example.com/sitemap-blog-2.xml +http://example.com/sitemap-blog-3.xml +http://example.com/sitemap-blog-4.xml +http://example.com/sitemap-blog-5.xml diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__2.txt b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__2.txt new file mode 100644 index 0000000..dd4bed6 --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__2.txt @@ -0,0 +1,100 @@ +http://example.com/blog +http://example.com/blog/posts/post-1 +http://example.com/blog/posts/post-2 +http://example.com/blog/posts/post-3 +http://example.com/blog/posts/post-4 +http://example.com/blog/posts/post-5 +http://example.com/blog/posts/post-6 +http://example.com/blog/posts/post-7 +http://example.com/blog/posts/post-8 +http://example.com/blog/posts/post-9 +http://example.com/blog/posts/post-10 +http://example.com/blog/posts/post-11 +http://example.com/blog/posts/post-12 +http://example.com/blog/posts/post-13 +http://example.com/blog/posts/post-14 +http://example.com/blog/posts/post-15 +http://example.com/blog/posts/post-16 +http://example.com/blog/posts/post-17 +http://example.com/blog/posts/post-18 +http://example.com/blog/posts/post-19 +http://example.com/blog/posts/post-20 +http://example.com/blog/posts/post-21 +http://example.com/blog/posts/post-22 +http://example.com/blog/posts/post-23 +http://example.com/blog/posts/post-24 +http://example.com/blog/posts/post-25 +http://example.com/blog/posts/post-26 +http://example.com/blog/posts/post-27 +http://example.com/blog/posts/post-28 +http://example.com/blog/posts/post-29 +http://example.com/blog/posts/post-30 +http://example.com/blog/posts/post-31 +http://example.com/blog/posts/post-32 +http://example.com/blog/posts/post-33 +http://example.com/blog/posts/post-34 +http://example.com/blog/posts/post-35 +http://example.com/blog/posts/post-36 +http://example.com/blog/posts/post-37 +http://example.com/blog/posts/post-38 +http://example.com/blog/posts/post-39 +http://example.com/blog/posts/post-40 +http://example.com/blog/posts/post-41 +http://example.com/blog/posts/post-42 +http://example.com/blog/posts/post-43 +http://example.com/blog/posts/post-44 +http://example.com/blog/posts/post-45 +http://example.com/blog/posts/post-46 +http://example.com/blog/posts/post-47 +http://example.com/blog/posts/post-48 +http://example.com/blog/posts/post-49 +http://example.com/blog/posts/post-50 +http://example.com/blog/posts/post-51 +http://example.com/blog/posts/post-52 +http://example.com/blog/posts/post-53 +http://example.com/blog/posts/post-54 +http://example.com/blog/posts/post-55 +http://example.com/blog/posts/post-56 +http://example.com/blog/posts/post-57 +http://example.com/blog/posts/post-58 +http://example.com/blog/posts/post-59 +http://example.com/blog/posts/post-60 +http://example.com/blog/posts/post-61 +http://example.com/blog/posts/post-62 +http://example.com/blog/posts/post-63 +http://example.com/blog/posts/post-64 +http://example.com/blog/posts/post-65 +http://example.com/blog/posts/post-66 +http://example.com/blog/posts/post-67 +http://example.com/blog/posts/post-68 +http://example.com/blog/posts/post-69 +http://example.com/blog/posts/post-70 +http://example.com/blog/posts/post-71 +http://example.com/blog/posts/post-72 +http://example.com/blog/posts/post-73 +http://example.com/blog/posts/post-74 +http://example.com/blog/posts/post-75 +http://example.com/blog/posts/post-76 +http://example.com/blog/posts/post-77 +http://example.com/blog/posts/post-78 +http://example.com/blog/posts/post-79 +http://example.com/blog/posts/post-80 +http://example.com/blog/posts/post-81 +http://example.com/blog/posts/post-82 +http://example.com/blog/posts/post-83 +http://example.com/blog/posts/post-84 +http://example.com/blog/posts/post-85 +http://example.com/blog/posts/post-86 +http://example.com/blog/posts/post-87 +http://example.com/blog/posts/post-88 +http://example.com/blog/posts/post-89 +http://example.com/blog/posts/post-90 +http://example.com/blog/posts/post-91 +http://example.com/blog/posts/post-92 +http://example.com/blog/posts/post-93 +http://example.com/blog/posts/post-94 +http://example.com/blog/posts/post-95 +http://example.com/blog/posts/post-96 +http://example.com/blog/posts/post-97 +http://example.com/blog/posts/post-98 +http://example.com/blog/posts/post-99 diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__3.txt b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__3.txt new file mode 100644 index 0000000..b653d11 --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__3.txt @@ -0,0 +1,100 @@ +http://example.com/blog/posts/post-100 +http://example.com/blog/posts/post-101 +http://example.com/blog/posts/post-102 +http://example.com/blog/posts/post-103 +http://example.com/blog/posts/post-104 +http://example.com/blog/posts/post-105 +http://example.com/blog/posts/post-106 +http://example.com/blog/posts/post-107 +http://example.com/blog/posts/post-108 +http://example.com/blog/posts/post-109 +http://example.com/blog/posts/post-110 +http://example.com/blog/posts/post-111 +http://example.com/blog/posts/post-112 +http://example.com/blog/posts/post-113 +http://example.com/blog/posts/post-114 +http://example.com/blog/posts/post-115 +http://example.com/blog/posts/post-116 +http://example.com/blog/posts/post-117 +http://example.com/blog/posts/post-118 +http://example.com/blog/posts/post-119 +http://example.com/blog/posts/post-120 +http://example.com/blog/posts/post-121 +http://example.com/blog/posts/post-122 +http://example.com/blog/posts/post-123 +http://example.com/blog/posts/post-124 +http://example.com/blog/posts/post-125 +http://example.com/blog/posts/post-126 +http://example.com/blog/posts/post-127 +http://example.com/blog/posts/post-128 +http://example.com/blog/posts/post-129 +http://example.com/blog/posts/post-130 +http://example.com/blog/posts/post-131 +http://example.com/blog/posts/post-132 +http://example.com/blog/posts/post-133 +http://example.com/blog/posts/post-134 +http://example.com/blog/posts/post-135 +http://example.com/blog/posts/post-136 +http://example.com/blog/posts/post-137 +http://example.com/blog/posts/post-138 +http://example.com/blog/posts/post-139 +http://example.com/blog/posts/post-140 +http://example.com/blog/posts/post-141 +http://example.com/blog/posts/post-142 +http://example.com/blog/posts/post-143 +http://example.com/blog/posts/post-144 +http://example.com/blog/posts/post-145 +http://example.com/blog/posts/post-146 +http://example.com/blog/posts/post-147 +http://example.com/blog/posts/post-148 +http://example.com/blog/posts/post-149 +http://example.com/blog/posts/post-150 +http://example.com/blog/posts/post-151 +http://example.com/blog/posts/post-152 +http://example.com/blog/posts/post-153 +http://example.com/blog/posts/post-154 +http://example.com/blog/posts/post-155 +http://example.com/blog/posts/post-156 +http://example.com/blog/posts/post-157 +http://example.com/blog/posts/post-158 +http://example.com/blog/posts/post-159 +http://example.com/blog/posts/post-160 +http://example.com/blog/posts/post-161 +http://example.com/blog/posts/post-162 +http://example.com/blog/posts/post-163 +http://example.com/blog/posts/post-164 +http://example.com/blog/posts/post-165 +http://example.com/blog/posts/post-166 +http://example.com/blog/posts/post-167 +http://example.com/blog/posts/post-168 +http://example.com/blog/posts/post-169 +http://example.com/blog/posts/post-170 +http://example.com/blog/posts/post-171 +http://example.com/blog/posts/post-172 +http://example.com/blog/posts/post-173 +http://example.com/blog/posts/post-174 +http://example.com/blog/posts/post-175 +http://example.com/blog/posts/post-176 +http://example.com/blog/posts/post-177 +http://example.com/blog/posts/post-178 +http://example.com/blog/posts/post-179 +http://example.com/blog/posts/post-180 +http://example.com/blog/posts/post-181 +http://example.com/blog/posts/post-182 +http://example.com/blog/posts/post-183 +http://example.com/blog/posts/post-184 +http://example.com/blog/posts/post-185 +http://example.com/blog/posts/post-186 +http://example.com/blog/posts/post-187 +http://example.com/blog/posts/post-188 +http://example.com/blog/posts/post-189 +http://example.com/blog/posts/post-190 +http://example.com/blog/posts/post-191 +http://example.com/blog/posts/post-192 +http://example.com/blog/posts/post-193 +http://example.com/blog/posts/post-194 +http://example.com/blog/posts/post-195 +http://example.com/blog/posts/post-196 +http://example.com/blog/posts/post-197 +http://example.com/blog/posts/post-198 +http://example.com/blog/posts/post-199 diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__4.txt b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__4.txt new file mode 100644 index 0000000..a350706 --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__4.txt @@ -0,0 +1,100 @@ +http://example.com/blog/posts/post-200 +http://example.com/blog/posts/post-201 +http://example.com/blog/posts/post-202 +http://example.com/blog/posts/post-203 +http://example.com/blog/posts/post-204 +http://example.com/blog/posts/post-205 +http://example.com/blog/posts/post-206 +http://example.com/blog/posts/post-207 +http://example.com/blog/posts/post-208 +http://example.com/blog/posts/post-209 +http://example.com/blog/posts/post-210 +http://example.com/blog/posts/post-211 +http://example.com/blog/posts/post-212 +http://example.com/blog/posts/post-213 +http://example.com/blog/posts/post-214 +http://example.com/blog/posts/post-215 +http://example.com/blog/posts/post-216 +http://example.com/blog/posts/post-217 +http://example.com/blog/posts/post-218 +http://example.com/blog/posts/post-219 +http://example.com/blog/posts/post-220 +http://example.com/blog/posts/post-221 +http://example.com/blog/posts/post-222 +http://example.com/blog/posts/post-223 +http://example.com/blog/posts/post-224 +http://example.com/blog/posts/post-225 +http://example.com/blog/posts/post-226 +http://example.com/blog/posts/post-227 +http://example.com/blog/posts/post-228 +http://example.com/blog/posts/post-229 +http://example.com/blog/posts/post-230 +http://example.com/blog/posts/post-231 +http://example.com/blog/posts/post-232 +http://example.com/blog/posts/post-233 +http://example.com/blog/posts/post-234 +http://example.com/blog/posts/post-235 +http://example.com/blog/posts/post-236 +http://example.com/blog/posts/post-237 +http://example.com/blog/posts/post-238 +http://example.com/blog/posts/post-239 +http://example.com/blog/posts/post-240 +http://example.com/blog/posts/post-241 +http://example.com/blog/posts/post-242 +http://example.com/blog/posts/post-243 +http://example.com/blog/posts/post-244 +http://example.com/blog/posts/post-245 +http://example.com/blog/posts/post-246 +http://example.com/blog/posts/post-247 +http://example.com/blog/posts/post-248 +http://example.com/blog/posts/post-249 +http://example.com/blog/posts/post-250 +http://example.com/blog/posts/post-251 +http://example.com/blog/posts/post-252 +http://example.com/blog/posts/post-253 +http://example.com/blog/posts/post-254 +http://example.com/blog/posts/post-255 +http://example.com/blog/posts/post-256 +http://example.com/blog/posts/post-257 +http://example.com/blog/posts/post-258 +http://example.com/blog/posts/post-259 +http://example.com/blog/posts/post-260 +http://example.com/blog/posts/post-261 +http://example.com/blog/posts/post-262 +http://example.com/blog/posts/post-263 +http://example.com/blog/posts/post-264 +http://example.com/blog/posts/post-265 +http://example.com/blog/posts/post-266 +http://example.com/blog/posts/post-267 +http://example.com/blog/posts/post-268 +http://example.com/blog/posts/post-269 +http://example.com/blog/posts/post-270 +http://example.com/blog/posts/post-271 +http://example.com/blog/posts/post-272 +http://example.com/blog/posts/post-273 +http://example.com/blog/posts/post-274 +http://example.com/blog/posts/post-275 +http://example.com/blog/posts/post-276 +http://example.com/blog/posts/post-277 +http://example.com/blog/posts/post-278 +http://example.com/blog/posts/post-279 +http://example.com/blog/posts/post-280 +http://example.com/blog/posts/post-281 +http://example.com/blog/posts/post-282 +http://example.com/blog/posts/post-283 +http://example.com/blog/posts/post-284 +http://example.com/blog/posts/post-285 +http://example.com/blog/posts/post-286 +http://example.com/blog/posts/post-287 +http://example.com/blog/posts/post-288 +http://example.com/blog/posts/post-289 +http://example.com/blog/posts/post-290 +http://example.com/blog/posts/post-291 +http://example.com/blog/posts/post-292 +http://example.com/blog/posts/post-293 +http://example.com/blog/posts/post-294 +http://example.com/blog/posts/post-295 +http://example.com/blog/posts/post-296 +http://example.com/blog/posts/post-297 +http://example.com/blog/posts/post-298 +http://example.com/blog/posts/post-299 diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__5.txt b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__5.txt new file mode 100644 index 0000000..a7c20ef --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__5.txt @@ -0,0 +1,100 @@ +http://example.com/blog/posts/post-300 +http://example.com/blog/posts/post-301 +http://example.com/blog/posts/post-302 +http://example.com/blog/posts/post-303 +http://example.com/blog/posts/post-304 +http://example.com/blog/posts/post-305 +http://example.com/blog/posts/post-306 +http://example.com/blog/posts/post-307 +http://example.com/blog/posts/post-308 +http://example.com/blog/posts/post-309 +http://example.com/blog/posts/post-310 +http://example.com/blog/posts/post-311 +http://example.com/blog/posts/post-312 +http://example.com/blog/posts/post-313 +http://example.com/blog/posts/post-314 +http://example.com/blog/posts/post-315 +http://example.com/blog/posts/post-316 +http://example.com/blog/posts/post-317 +http://example.com/blog/posts/post-318 +http://example.com/blog/posts/post-319 +http://example.com/blog/posts/post-320 +http://example.com/blog/posts/post-321 +http://example.com/blog/posts/post-322 +http://example.com/blog/posts/post-323 +http://example.com/blog/posts/post-324 +http://example.com/blog/posts/post-325 +http://example.com/blog/posts/post-326 +http://example.com/blog/posts/post-327 +http://example.com/blog/posts/post-328 +http://example.com/blog/posts/post-329 +http://example.com/blog/posts/post-330 +http://example.com/blog/posts/post-331 +http://example.com/blog/posts/post-332 +http://example.com/blog/posts/post-333 +http://example.com/blog/posts/post-334 +http://example.com/blog/posts/post-335 +http://example.com/blog/posts/post-336 +http://example.com/blog/posts/post-337 +http://example.com/blog/posts/post-338 +http://example.com/blog/posts/post-339 +http://example.com/blog/posts/post-340 +http://example.com/blog/posts/post-341 +http://example.com/blog/posts/post-342 +http://example.com/blog/posts/post-343 +http://example.com/blog/posts/post-344 +http://example.com/blog/posts/post-345 +http://example.com/blog/posts/post-346 +http://example.com/blog/posts/post-347 +http://example.com/blog/posts/post-348 +http://example.com/blog/posts/post-349 +http://example.com/blog/posts/post-350 +http://example.com/blog/posts/post-351 +http://example.com/blog/posts/post-352 +http://example.com/blog/posts/post-353 +http://example.com/blog/posts/post-354 +http://example.com/blog/posts/post-355 +http://example.com/blog/posts/post-356 +http://example.com/blog/posts/post-357 +http://example.com/blog/posts/post-358 +http://example.com/blog/posts/post-359 +http://example.com/blog/posts/post-360 +http://example.com/blog/posts/post-361 +http://example.com/blog/posts/post-362 +http://example.com/blog/posts/post-363 +http://example.com/blog/posts/post-364 +http://example.com/blog/posts/post-365 +http://example.com/blog/posts/post-366 +http://example.com/blog/posts/post-367 +http://example.com/blog/posts/post-368 +http://example.com/blog/posts/post-369 +http://example.com/blog/posts/post-370 +http://example.com/blog/posts/post-371 +http://example.com/blog/posts/post-372 +http://example.com/blog/posts/post-373 +http://example.com/blog/posts/post-374 +http://example.com/blog/posts/post-375 +http://example.com/blog/posts/post-376 +http://example.com/blog/posts/post-377 +http://example.com/blog/posts/post-378 +http://example.com/blog/posts/post-379 +http://example.com/blog/posts/post-380 +http://example.com/blog/posts/post-381 +http://example.com/blog/posts/post-382 +http://example.com/blog/posts/post-383 +http://example.com/blog/posts/post-384 +http://example.com/blog/posts/post-385 +http://example.com/blog/posts/post-386 +http://example.com/blog/posts/post-387 +http://example.com/blog/posts/post-388 +http://example.com/blog/posts/post-389 +http://example.com/blog/posts/post-390 +http://example.com/blog/posts/post-391 +http://example.com/blog/posts/post-392 +http://example.com/blog/posts/post-393 +http://example.com/blog/posts/post-394 +http://example.com/blog/posts/post-395 +http://example.com/blog/posts/post-396 +http://example.com/blog/posts/post-397 +http://example.com/blog/posts/post-398 +http://example.com/blog/posts/post-399 diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__6.txt b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__6.txt new file mode 100644 index 0000000..cd779bc --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_chunk_a_huge_sitemap_on_render__6.txt @@ -0,0 +1,100 @@ +http://example.com/blog/posts/post-400 +http://example.com/blog/posts/post-401 +http://example.com/blog/posts/post-402 +http://example.com/blog/posts/post-403 +http://example.com/blog/posts/post-404 +http://example.com/blog/posts/post-405 +http://example.com/blog/posts/post-406 +http://example.com/blog/posts/post-407 +http://example.com/blog/posts/post-408 +http://example.com/blog/posts/post-409 +http://example.com/blog/posts/post-410 +http://example.com/blog/posts/post-411 +http://example.com/blog/posts/post-412 +http://example.com/blog/posts/post-413 +http://example.com/blog/posts/post-414 +http://example.com/blog/posts/post-415 +http://example.com/blog/posts/post-416 +http://example.com/blog/posts/post-417 +http://example.com/blog/posts/post-418 +http://example.com/blog/posts/post-419 +http://example.com/blog/posts/post-420 +http://example.com/blog/posts/post-421 +http://example.com/blog/posts/post-422 +http://example.com/blog/posts/post-423 +http://example.com/blog/posts/post-424 +http://example.com/blog/posts/post-425 +http://example.com/blog/posts/post-426 +http://example.com/blog/posts/post-427 +http://example.com/blog/posts/post-428 +http://example.com/blog/posts/post-429 +http://example.com/blog/posts/post-430 +http://example.com/blog/posts/post-431 +http://example.com/blog/posts/post-432 +http://example.com/blog/posts/post-433 +http://example.com/blog/posts/post-434 +http://example.com/blog/posts/post-435 +http://example.com/blog/posts/post-436 +http://example.com/blog/posts/post-437 +http://example.com/blog/posts/post-438 +http://example.com/blog/posts/post-439 +http://example.com/blog/posts/post-440 +http://example.com/blog/posts/post-441 +http://example.com/blog/posts/post-442 +http://example.com/blog/posts/post-443 +http://example.com/blog/posts/post-444 +http://example.com/blog/posts/post-445 +http://example.com/blog/posts/post-446 +http://example.com/blog/posts/post-447 +http://example.com/blog/posts/post-448 +http://example.com/blog/posts/post-449 +http://example.com/blog/posts/post-450 +http://example.com/blog/posts/post-451 +http://example.com/blog/posts/post-452 +http://example.com/blog/posts/post-453 +http://example.com/blog/posts/post-454 +http://example.com/blog/posts/post-455 +http://example.com/blog/posts/post-456 +http://example.com/blog/posts/post-457 +http://example.com/blog/posts/post-458 +http://example.com/blog/posts/post-459 +http://example.com/blog/posts/post-460 +http://example.com/blog/posts/post-461 +http://example.com/blog/posts/post-462 +http://example.com/blog/posts/post-463 +http://example.com/blog/posts/post-464 +http://example.com/blog/posts/post-465 +http://example.com/blog/posts/post-466 +http://example.com/blog/posts/post-467 +http://example.com/blog/posts/post-468 +http://example.com/blog/posts/post-469 +http://example.com/blog/posts/post-470 +http://example.com/blog/posts/post-471 +http://example.com/blog/posts/post-472 +http://example.com/blog/posts/post-473 +http://example.com/blog/posts/post-474 +http://example.com/blog/posts/post-475 +http://example.com/blog/posts/post-476 +http://example.com/blog/posts/post-477 +http://example.com/blog/posts/post-478 +http://example.com/blog/posts/post-479 +http://example.com/blog/posts/post-480 +http://example.com/blog/posts/post-481 +http://example.com/blog/posts/post-482 +http://example.com/blog/posts/post-483 +http://example.com/blog/posts/post-484 +http://example.com/blog/posts/post-485 +http://example.com/blog/posts/post-486 +http://example.com/blog/posts/post-487 +http://example.com/blog/posts/post-488 +http://example.com/blog/posts/post-489 +http://example.com/blog/posts/post-490 +http://example.com/blog/posts/post-491 +http://example.com/blog/posts/post-492 +http://example.com/blog/posts/post-493 +http://example.com/blog/posts/post-494 +http://example.com/blog/posts/post-495 +http://example.com/blog/posts/post-496 +http://example.com/blog/posts/post-497 +http://example.com/blog/posts/post-498 +http://example.com/blog/posts/post-499 diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_respond_with_http_response__2.txt b/tests/__snapshots__/SitemapManagerTest__it_can_respond_with_http_response__2.txt new file mode 100644 index 0000000..d4c4ad5 --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_respond_with_http_response__2.txt @@ -0,0 +1,2 @@ +http://example.com/sitemap-pages.xml +http://example.com/sitemap-blog.xml diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_respond_with_http_response__3.txt b/tests/__snapshots__/SitemapManagerTest__it_can_respond_with_http_response__3.txt new file mode 100644 index 0000000..34e5452 --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_respond_with_http_response__3.txt @@ -0,0 +1,95 @@ + + + + XML Sitemaps RSS Feed + http://example.com/sitemap-blog.xml + + Blog page + http://example.com/blog + 2017-01-02T00:00:00+00:00 + weekly + 0.7 + sitemap + + + Blog / Post 1 + http://example.com/blog/posts/post-1 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 2 + http://example.com/blog/posts/post-2 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 3 + http://example.com/blog/posts/post-3 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 4 + http://example.com/blog/posts/post-4 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 5 + http://example.com/blog/posts/post-5 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 6 + http://example.com/blog/posts/post-6 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 7 + http://example.com/blog/posts/post-7 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 8 + http://example.com/blog/posts/post-8 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 9 + http://example.com/blog/posts/post-9 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + Blog / Post 10 + http://example.com/blog/posts/post-10 + 2017-01-02T00:00:00+00:00 + monthly + 0.5 + sitemap + + + diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__1.txt b/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__1.txt new file mode 100644 index 0000000..d4c4ad5 --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__1.txt @@ -0,0 +1,2 @@ +http://example.com/sitemap-pages.xml +http://example.com/sitemap-blog.xml diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__2.txt b/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__2.txt new file mode 100644 index 0000000..17fe4cd --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__2.txt @@ -0,0 +1,3 @@ +http://example.com/ +http://example.com/about-us +http://example.com/contact diff --git a/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__3.txt b/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__3.txt new file mode 100644 index 0000000..ad3fe0c --- /dev/null +++ b/tests/__snapshots__/SitemapManagerTest__it_can_switch_sitemap_format_to_txt__3.txt @@ -0,0 +1,11 @@ +http://example.com/blog +http://example.com/blog/posts/post-1 +http://example.com/blog/posts/post-2 +http://example.com/blog/posts/post-3 +http://example.com/blog/posts/post-4 +http://example.com/blog/posts/post-5 +http://example.com/blog/posts/post-6 +http://example.com/blog/posts/post-7 +http://example.com/blog/posts/post-8 +http://example.com/blog/posts/post-9 +http://example.com/blog/posts/post-10 diff --git a/resources/lang/en/frequencies.php b/translations/en/frequencies.php similarity index 100% rename from resources/lang/en/frequencies.php rename to translations/en/frequencies.php diff --git a/resources/lang/fr/frequencies.php b/translations/fr/frequencies.php similarity index 100% rename from resources/lang/fr/frequencies.php rename to translations/fr/frequencies.php diff --git a/resources/views/sitemap-index/rss.blade.php b/views/sitemap-index/rss.blade.php similarity index 100% rename from resources/views/sitemap-index/rss.blade.php rename to views/sitemap-index/rss.blade.php diff --git a/resources/views/sitemap-index/txt.blade.php b/views/sitemap-index/txt.blade.php similarity index 100% rename from resources/views/sitemap-index/txt.blade.php rename to views/sitemap-index/txt.blade.php diff --git a/resources/views/sitemap-index/xml.blade.php b/views/sitemap-index/xml.blade.php similarity index 100% rename from resources/views/sitemap-index/xml.blade.php rename to views/sitemap-index/xml.blade.php diff --git a/resources/views/sitemap/rss.blade.php b/views/sitemap/rss.blade.php similarity index 100% rename from resources/views/sitemap/rss.blade.php rename to views/sitemap/rss.blade.php diff --git a/resources/views/sitemap/txt.blade.php b/views/sitemap/txt.blade.php similarity index 100% rename from resources/views/sitemap/txt.blade.php rename to views/sitemap/txt.blade.php diff --git a/resources/views/sitemap/xml.blade.php b/views/sitemap/xml.blade.php similarity index 100% rename from resources/views/sitemap/xml.blade.php rename to views/sitemap/xml.blade.php