Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dvershinin committed May 3, 2023
2 parents 020b11a + 402a6a8 commit fda821d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ The commands allow to speed up compilation and deployment of static assets, as w
```bash
sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm
sudo yum -y install n98-magerun2-module-getpagespeed

cd /path/to/magento2

# Get tuned Varnish parameters specifc to your Magento 2 instance
n98-magerun2 varnish:tuned

# Get active themes
n98-magerun2 dev:theme:active
```
Expand All @@ -31,7 +34,7 @@ Varnish params: <b>-p http_resp_hdr_len=54684 -p http_resp_size=79260 -p workspa
Largest product category has this number of products: <b>2604</b>
</pre>

Simply copy-paste suggested configuration bits to e.g. `/etc/varnish/varnish.params` or otherwise
Simply copy-paste the suggested configuration bits to e.g. `/etc/varnish/varnish.params` or otherwise
specify as startup parameters to Varnish.

### `n98-magerun2 dev:theme:active`
Expand Down Expand Up @@ -69,7 +72,6 @@ over to deployment command:
<em>#></em> <b>en_US en_GB</b>
</pre>


Combining all the things together for a no-dumb and much quicker static deployment:

```bash
Expand Down
4 changes: 4 additions & 0 deletions src/GetPageSpeed/DevThemeActiveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
$sql = sprintf('SELECT DISTINCT theme_path FROM `%s` LEFT JOIN `%s` ON `value` = `theme_id` WHERE `path`=\'design/theme/theme_id\'',
$themeTableName, $configTableName);
$res = $connection->fetchCol($sql);

if (!count($res)) {
$res[] = 'Magento/luma';
}

if (!$input->getOption('format')) {
$out = array();
Expand Down

0 comments on commit fda821d

Please # to comment.