Table of Contents & Menu
Navigation

Installing Hyvä CSP Default Theme

Install the CSP-compatible Hyvä Theme using the following command. For general installation steps, refer to the regular installation instructions.

composer require hyva-themes/magento2-default-theme-csp

Hyva/default-csp vs Hyva/default

The CSP-compatible theme uses the name Hyva/default-csp. When migrating a custom child theme to be CSP-compatible, update the parent theme name in your theme.xml file:

    <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
        <title>My Theme</title>
        <parent>Hyva/default-csp</parent>
        <!--<parent>Hyva/default</parent>-->
    </theme>

Additionally, update the content path in your child theme's tailwind.config.js to include vendor/hyva-themes/magento2-default-theme-csp.

Installing the default and the default-csp theme side-by-side

Both the regular and CSP-compatible default themes can be installed simultaneously:

composer require hyva-themes/magento2-default-theme
composer require hyva-themes/magento2-default-theme-csp

While not required, this is useful for migrating custom child themes to be strict CSP-compatible.