Skip to content

Commit

Permalink
Site 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jul 11, 2022
1 parent c69e2e8 commit de00d6f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,5 +1,5 @@
<a name="2.0.0"></a>
# [2.0.0](https://github.com/flextype-plugins/site/compare/v1.11.0...v2.0.0) (2021-07-XX)
# [2.0.0](https://github.com/flextype-plugins/site/compare/v1.11.0...v2.0.0) (2021-07-11)

### Features

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -15,7 +15,7 @@ The following dependencies need to be downloaded and installed for Site Plugin.
| [flextype](https://github.com/flextype/flextype) | ^1.0.0-alpha.1 | [download](https://github.com/flextype/flextype/releases) |
| [twig](https://github.com/flextype-plugins/twig) | ^3.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |

* twig is optional dependency.
* twig plugin is optional dependency.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion lang/ru_RU.yaml
@@ -1,3 +1,3 @@
site_title: Site
site_description: Site plugin to display entries content on the website frontend.
site_powered_by_flextype: Создавайте быстрые и легкие в управлении веб-сайты c <a href="https://awilum.github.io/flextype/ru" target="_blank">Flextype</a>.
site_powered_by_flextype: Создавайте быстрые и легкие в управлении веб-сайты c <a href="https://awilum.github.io/flextype" target="_blank">Flextype</a>.
2 changes: 1 addition & 1 deletion settings.yaml
Expand Up @@ -66,7 +66,7 @@ minify:
html:

# enable HTML Compressor and Minifier
enabled: true
enabled: false

# optimize html via "HtmlDomParser()"
optimize_via_dom_parser: false
Expand Down
8 changes: 6 additions & 2 deletions src/core/Console/Commands/Site/SiteGenerateCommand.php
Expand Up @@ -99,7 +99,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

// Set entry to the SitemapController class property $sitemap
registry()->set('plugins.site.static.entries', $items);
registry()->set('plugins.site.settings.static.entries', $items);

// Run event onSitemapAfterInitialized
emitter()->emit('onStaticSiteAfterInitialized');
Expand Down Expand Up @@ -152,7 +152,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
);

// Iterate through the pages.
foreach(registry()->get('plugins.site.static.entries') as $page) {
foreach(registry()->get('plugins.site.settings.static.entries') as $page) {

// Create page folder.
filesystem()->directory($staticSitePath . '/' . $page['id'])->ensureExists(0755, true);
Expand Down Expand Up @@ -223,6 +223,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

foreach ($directories as $directory) {
if (in_array($directory, registry()->get('plugins.site.settings.static.ignore.assets'))) {
continue;
}

filesystem()->directory(FLEXTYPE_PATH_PROJECT . '/assets/' . $directory)->copy($staticSitePath . '/' . FLEXTYPE_PROJECT_NAME . '/assets/' . $directory);
}

Expand Down

0 comments on commit de00d6f

Please sign in to comment.