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

Improve RSS image handling and feed and sitemap generation processes #435

Merged
merged 24 commits into from
May 20, 2022
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
911a0da
Create Action class to find Image content lengths
caendesilva May 20, 2022
a10c1c3
Fetch information for local images
caendesilva May 20, 2022
6173a1a
Fetch information for remote images
caendesilva May 20, 2022
6a494a5
Add experimental support for remote images
caendesilva May 20, 2022
e827132
Move execution tests for subprocess
caendesilva May 20, 2022
82c73a3
Create build:sitemap command
caendesilva May 20, 2022
f995532
Add a preflight check
caendesilva May 20, 2022
65c25f8
Fix the test
caendesilva May 20, 2022
1c2a927
Require blog post feature to be enabled
caendesilva May 20, 2022
b2196a3
Wrap debug output in conditional
caendesilva May 20, 2022
97e9cbc
Only send debug info for HTTP calls and failures
caendesilva May 20, 2022
ac4788f
Create HydeBuildRssFeedCommand.php
caendesilva May 20, 2022
aac87ac
Move execution tests for subprocess
caendesilva May 20, 2022
2543b33
Create HydeBuildRssFeedCommandTest.php
caendesilva May 20, 2022
b236b4c
Add remote image preflight check
caendesilva May 20, 2022
0ec6d49
Reduce code complexity
caendesilva May 20, 2022
ad764ac
Offload RSS feed and sitemap generation to subcommands
caendesilva May 20, 2022
236b475
Inline method reducing undue complexity
caendesilva May 20, 2022
25e4e87
Remove unused internal method
caendesilva May 20, 2022
3fe8cfb
Add RSS and sitemap information to the docs
caendesilva May 20, 2022
4cb7c2f
Register the new commands
caendesilva May 20, 2022
2d24525
Normalize enclosure to URI paths for local images
caendesilva May 20, 2022
bc1e3ac
Apply fixes from StyleCI
StyleCIBot May 20, 2022
a017c40
Merge pull request #433 from hydephp/analysis-KZEVr3
May 20, 2022
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
Prev Previous commit
Next Next commit
Move execution tests for subprocess
  • Loading branch information
caendesilva committed May 20, 2022
commit e82713272a82c222519e48f84c2e5cf0140452ed
7 changes: 1 addition & 6 deletions tests/Feature/Commands/BuildStaticSiteCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,19 @@ public function test_sitemap_is_not_generated_when_conditions_are_not_met()
config(['hyde.site_url' => '']);
config(['hyde.generateSitemap' => false]);

unlinkIfExists(Hyde::path('_site/sitemap.xml'));
$this->artisan('build')
->doesntExpectOutput('Generating sitemap...')
->assertExitCode(0);

$this->assertFileDoesNotExist(Hyde::path('_site/sitemap.xml'));
}

public function test_sitemap_is_generated_when_conditions_are_met()
{
config(['hyde.site_url' => 'https://example.com']);
config(['hyde.generateSitemap' => true]);

unlinkIfExists(Hyde::path('_site/sitemap.xml'));
$this->artisan('build')
->expectsOutput('Generating sitemap...')
->assertExitCode(0);

$this->assertFileExists(Hyde::path('_site/sitemap.xml'));
unlink(Hyde::path('_site/sitemap.xml'));
}

Expand Down