Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default RSS feed description value to config stub #1253

Merged
merged 4 commits into from
Mar 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This serves two purposes:
- for new features.

### Changed
- for changes in existing functionality.
- Added default RSS feed description value to config stub.

### Deprecated
- for soon-to-be removed features.
Expand Down
4 changes: 2 additions & 2 deletions config/hyde.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
// What filename should the RSS file use?
'rss_filename' => 'feed.xml',

// The channel description. By default this is "Site Name + RSS Feed".
// 'rss_description' => '',
// The channel description.
'rss_description' => env('SITE_NAME', 'HydePHP').' RSS Feed',

/*
|--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions packages/framework/config/hyde.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
// What filename should the RSS file use?
'rss_filename' => 'feed.xml',

// The channel description. By default this is "Site Name + RSS Feed".
// 'rss_description' => '',
// The channel description.
'rss_description' => env('SITE_NAME', 'HydePHP').' RSS Feed',

/*
|--------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions packages/framework/tests/Feature/GlobalMetadataBagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public function test_site_metadata_rss_feed_uses_configured_site_name()
config(['hyde.url' => 'foo']);
config(['hyde.name' => 'Site']);
config(['hyde.generate_rss_feed' => true]);
$config = config('hyde');
unset($config['rss_description']);
config(['hyde' => $config]);
$this->file('_posts/foo.md');

$this->assertEquals('<link rel="alternate" href="foo/feed.xml" type="application/rss+xml" title="Site RSS Feed">', GlobalMetadataBag::make()->render());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function test_xml_channel_element_has_required_elements()
{
config(['hyde.name' => 'Test Blog']);
config(['hyde.url' => 'https://example.com']);
config(['hyde.rss_description' => 'Test Blog RSS Feed']);

$service = new RssFeedGenerator();
$this->assertTrue(property_exists($service->getXmlElement()->channel, 'title'));
Expand Down