From aef50d6721f2a83cf000c8ab198d0ffc7b627ce8 Mon Sep 17 00:00:00 2001 From: Sergey Romanenko Date: Mon, 11 Jul 2022 18:22:42 +0300 Subject: [PATCH] Feed 2.0.0 --- CHANGELOG.md | 3 ++- settings.yaml | 4 ++-- src/core/Console/Commands/Feed/FeedGenerateCommand.php | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c99dfdc..4c7ee9b 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ -# v2.0.0, 2022-xx-xx +# v2.0.0, 2022-07-11 ### Features * **core** Updated code base for new Flextype 1.0.0-alpha.1 +* **core** Adde ability to generate static feeds. # v1.0.0, 2021-01-15 * Initial release diff --git a/settings.yaml b/settings.yaml index e3b8e34..93ca288 100644 --- a/settings.yaml +++ b/settings.yaml @@ -11,7 +11,7 @@ feeds: [] static: # Feeds path (without trailing and without starting slash) - feed_path: '_site' + path: '_site' # Site url (without trailing slash) - feed_url: '' \ No newline at end of file + site_url: '' \ No newline at end of file diff --git a/src/core/Console/Commands/Feed/FeedGenerateCommand.php b/src/core/Console/Commands/Feed/FeedGenerateCommand.php index d812f49..388eb4c 100644 --- a/src/core/Console/Commands/Feed/FeedGenerateCommand.php +++ b/src/core/Console/Commands/Feed/FeedGenerateCommand.php @@ -34,7 +34,7 @@ protected function configure(): void { $this->setName('feed:generate'); $this->setDescription('Generate feed.'); - $this->addOption('feed-path', null, InputOption::VALUE_REQUIRED, 'Destination for generated static feed file (without trailing and without starting slash)'); + $this->addOption('path', null, InputOption::VALUE_REQUIRED, 'Destination for generated static feed file (without trailing and without starting slash)'); $this->addOption('site-url', null, InputOption::VALUE_REQUIRED, 'Sit url (without trailing slash).'); } @@ -44,7 +44,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $result = Command::SUCCESS; - $feedPath = $input->getOption('feed-path') ? $input->getOption('feed-path') : registry()->get('plugins.feed.settings.static.feed_path'); + $feedPath = $input->getOption('path') ? $input->getOption('path') : registry()->get('plugins.feed.settings.static.path'); $staticFeedPath = FLEXTYPE_ROOT_DIR . '/' . $feedPath;