Skip to content

Commit

Permalink
Sitemap 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jul 11, 2022
1 parent b2dacb7 commit 521303d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="3.0.1"></a>
# [3.0.1](https://github.com/flextype-plugins/sitemap/compare/v3.0.0...v3.0.1) (2022-07-11)

### Bug Fixes

* **console** fix issue with sitemap generate command if destination directory does not exist.

<a name="3.0.0"></a>
# [3.0.0](https://github.com/flextype-plugins/sitemap/compare/v2.10.0...v3.0.0) (2022-07-11)

Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Sitemap
version: 3.0.0
version: 3.0.1
description: Provide automatically generated XML sitemap.
author:
name: Sergey Romanenko
Expand Down
4 changes: 4 additions & 0 deletions src/core/Console/Commands/Sitemap/SitemapGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
registry()->set('flextype.settings.base_path', '');
}

filesystem()->directory($staticSitemapPath)->ensureExists(0755, true);
filesystem()->directory($staticSitemapPath . '/' . FLEXTYPE_PROJECT_NAME . '/plugins/sitemap/views/templates')->ensureExists(0755, true);

$saveResult = filesystem()->file($staticSitemapPath . '/sitemap.xml')->put((new Sitemap())->fetch());
$saveResult = filesystem()->file(FLEXTYPE_PATH_PROJECT . '/plugins/sitemap/views/templates/sitemap.xsl')->copy($staticSitemapPath . '/' . FLEXTYPE_PROJECT_NAME . '/plugins/sitemap/views/templates/sitemap.xsl');

if ($saveResult) {
$output->write(
Expand Down

0 comments on commit 521303d

Please sign in to comment.