Skip to content

Commit

Permalink
fix: trying to generate sitemap for empty component
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Dec 24, 2023
1 parent 832f66a commit c0cc9f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Fixed trying to generate sitemap for empty component.

## [0.2.0] - 2023-12-24

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ private Path getComponentOutputPath(final Component component) throws IOExceptio
private WebSitemapGenerator getWebSitemapGenerator(final Component component,
final String sitemapBaseUrl,
final Path componentOutputPath) {
if (component.getPages().isEmpty()) {
return null;
}
if (component.isLatest()) {
try {
return new WebSitemapGenerator(sitemapBaseUrl, componentOutputPath.toFile());
Expand Down

0 comments on commit c0cc9f8

Please sign in to comment.