Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Commit

Permalink
Add instructions on adding additional logic
Browse files Browse the repository at this point in the history
  • Loading branch information
punkstar authored Jun 30, 2017
1 parent fdfbcdd commit f373cd9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,25 @@ Add this extension to your Magento installation with Composer:

## Usage

### Configuration

The Service Worker is configured and enabled by default. However, Service Workers require the site to run on HTTPS.

Features can be customised in *Stores > Configuration > General > Web > Service Worker Settings*.

### Adding more logic

If the base service worker file doesn't fit all of your needs you can easily add more logic using the layout system, targeting the `serviceworker_index_js` handle:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="serviceworker">
<block class="\Meanbee\MoreLogic\Block\Logic" name="morelogic.logic" template="Meanbee_MoreLogic::logic.phtml" />
</referenceBlock>
</body>
</page>

## FAQ

### Why do page assets not appear to be cached when Magento is in default/developer mode?
Expand Down

0 comments on commit f373cd9

Please sign in to comment.