diff --git a/src/Services/RssFeedService.php b/src/Services/RssFeedService.php index dc93228f..9852e9c1 100644 --- a/src/Services/RssFeedService.php +++ b/src/Services/RssFeedService.php @@ -122,7 +122,7 @@ protected function xmlEscape(string $string): string public static function getDefaultOutputFilename(): string { - return config('hyde.rssFilename', 'feed.rss'); + return config('hyde.rssFilename', 'feed.xml'); } public static function generateFeed(): string diff --git a/tests/Feature/Commands/BuildStaticSiteCommandTest.php b/tests/Feature/Commands/BuildStaticSiteCommandTest.php index 28c662bf..935f7e8c 100644 --- a/tests/Feature/Commands/BuildStaticSiteCommandTest.php +++ b/tests/Feature/Commands/BuildStaticSiteCommandTest.php @@ -124,11 +124,11 @@ public function test_rss_feed_is_not_generated_when_conditions_are_not_met() config(['hyde.site_url' => '']); config(['hyde.generateRssFeed' => false]); - unlinkIfExists(Hyde::path('_site/feed.rss')); + unlinkIfExists(Hyde::path('_site/feed.xml')); $this->artisan('build') ->assertExitCode(0); - $this->assertFileDoesNotExist(Hyde::path('_site/feed.rss')); + $this->assertFileDoesNotExist(Hyde::path('_site/feed.xml')); } public function test_rss_feed_is_generated_when_conditions_are_met() @@ -136,13 +136,13 @@ public function test_rss_feed_is_generated_when_conditions_are_met() config(['hyde.site_url' => 'https://example.com']); config(['hyde.generateRssFeed' => true]); - unlinkIfExists(Hyde::path('_site/feed.rss')); + unlinkIfExists(Hyde::path('_site/feed.xml')); $this->artisan('build') ->expectsOutput('Generating RSS feed...') ->assertExitCode(0); - $this->assertFileExists(Hyde::path('_site/feed.rss')); - unlink(Hyde::path('_site/feed.rss')); + $this->assertFileExists(Hyde::path('_site/feed.xml')); + unlink(Hyde::path('_site/feed.xml')); } public function test_rss_filename_can_be_changed() @@ -151,14 +151,14 @@ public function test_rss_filename_can_be_changed() config(['hyde.generateRssFeed' => true]); config(['hyde.rssFilename' => 'blog.xml']); - unlinkIfExists(Hyde::path('_site/feed.rss')); + unlinkIfExists(Hyde::path('_site/feed.xml')); unlinkIfExists(Hyde::path('_site/blog.xml')); $this->artisan('build') ->expectsOutput('Generating RSS feed...') ->assertExitCode(0); - $this->assertFileDoesNotExist(Hyde::path('_site/feed.rss')); + $this->assertFileDoesNotExist(Hyde::path('_site/feed.xml')); $this->assertFileExists(Hyde::path('_site/blog.xml')); unlink(Hyde::path('_site/blog.xml')); } diff --git a/tests/Feature/Services/RssFeedServiceTest.php b/tests/Feature/Services/RssFeedServiceTest.php index 5e8dca27..860232bf 100644 --- a/tests/Feature/Services/RssFeedServiceTest.php +++ b/tests/Feature/Services/RssFeedServiceTest.php @@ -57,7 +57,7 @@ public function test_xml_channel_element_has_additional_elements() $service = new RssFeedService(); $this->assertObjectHasAttribute('link', $service->feed->channel); $this->assertEquals('https://example.com', $service->feed->channel->link); - $this->assertEquals('https://example.com/feed.rss', + $this->assertEquals('https://example.com/feed.xml', $service->feed->channel->children('atom', true)->link->attributes()->href); $this->assertObjectHasAttribute('language', $service->feed->channel);