Sylius Bootstrap theme with build process based on Webpack Encore.
![](https://raw.githubusercontent.com/notFloran/BootstrapTheme/master/./docs/homepage-preview.png)
There are two ways to install a theme. It is possible to copy files in themes/
or add this package as a composer dependency and create a child theme. The instructions below refer to an installation in the theme folder.
Installation as a composer dependency is documented here
composer require sylius/bootstrap-theme:1.12
Files/folders to copy:
assets
templates
composer.json
webpack.config.js
yarn install
yarn add bootstrap@^5.3 @fortawesome/fontawesome-free@^6.4.2 lightbox axios @popperjs/core@^2.11 glightbox
+ const bootstrapTheme = require('./themes/BootstrapTheme/webpack.config');
// ...
- module.exports = [shopConfig, adminConfig, appShopConfig, appAdminConfig];
+ module.exports = [shopConfig, adminConfig, appShopConfig, appAdminConfig, bootstrapTheme];
# ./config/packages/assets.yaml
framework:
assets:
packages:
+ bootstrapTheme:
+ json_manifest_path: '%kernel.project_dir%/public/themes/bootstrap-theme/manifest.json'
# ./config/packages/webpack_encore.yaml
webpack_encore:
output_path: '%kernel.project_dir%/public/build'
builds:
+ bootstrapTheme: '%kernel.project_dir%/public/themes/bootstrap-theme'
# compile assets once
yarn dev
# recompile assets automatically when files change
yarn watch
# create a production build
yarn build
- Go to
Configuration > Channels
- Edit desired channel from the list
- Go to
Look & feel > Theme
section - Change theme to
Sylius Bootstrap Theme
This command will install the selected version of Sylius and the Bootstrap theme with its configuration. You just need to activate the theme in admin panel as described in the point above.
ℹ️ To be able to setup the plugin database, remember to configure you database credentials
in install/Application/.env.local
and/or install/Application/.env.test.local
.
$ make install -e SYLIUS_VERSION=XX SYMFONY_VERSION=YY PHP_VERSION=ZZ
Default values : XX=1.12.0 and YY=6.3 and ZZ=8.2
ℹ️ To reset (drop database and delete files) test environment:
$ make reset