Skip to content

Commit

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

### Bug Fixes

* **console** Fix settings naming for static site generation.

<a name="2.0.0"></a>
# [2.0.0](https://github.com/flextype-plugins/site/compare/v1.11.0...v2.0.0) (2021-07-11)

Expand Down
2 changes: 1 addition & 1 deletion settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ minify:
static:

# Destination for generated static site files (without trailing and without starting slash)
site_path: '_site'
path: '_site'

# Site url (without trailing slash)
site_url: ''
Expand Down
6 changes: 3 additions & 3 deletions src/core/Console/Commands/Site/SiteGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ protected function configure(): void
{
$this->setName('site:generate');
$this->setDescription('Generate site.');
$this->addOption('site-path', null, InputOption::VALUE_REQUIRED, 'Destination for generated static site files (without trailing and without starting slash)');
$this->addOption('path', null, InputOption::VALUE_REQUIRED, 'Destination for generated static site files (without trailing and without starting slash)');
$this->addOption('site-url', null, InputOption::VALUE_REQUIRED, 'Site url (without trailing).');
}

protected function execute(InputInterface $input, OutputInterface $output): int
{
$elapsedTimeStartPoint = microtime(true);

$sitePath = $input->getOption('site-path') ? $input->getOption('site-path') : registry()->get('plugins.site.settings.static.site_path');
$sitePath = $input->getOption('path') ? $input->getOption('path') : registry()->get('plugins.site.settings.static.path');

$staticSitePath = FLEXTYPE_ROOT_DIR . '/' . $sitePath;

Expand All @@ -55,7 +55,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
registry()->set('flextype.settings.base_path', '');
}

$staticSitePathMessage = registry()->get('plugins.site.settings.static.site_path');
$staticSitePathMessage = registry()->get('plugins.site.settings.static.path');

// Site items.
$items = [];
Expand Down

0 comments on commit 5601355

Please sign in to comment.