dft / silverstripe-recipe
SilverStripe 'kitchen sink' recipe for full CMS features
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 5
Language:SCSS
Type:silverstripe-recipe
Requires
- php: ^8.0
- axllent/silverstripe-scaled-uploads: ^2.3
- dft/silverstripe-bootstrap-4: ^1.0
- dft/silverstripe-call-to-actions: ^1
- dft/silverstripe-childhubpage: ^2.0
- dft/silverstripe-custommenus: ^2.0
- dft/silverstripe-deferedimages: ^1.0
- dft/silverstripe-fancy-top-nav: ^1.0
- dft/silverstripe-modern: ^1.0
- dft/silverstripe-sideswipe-theme: ^1.0
- dft/silverstripe-testimonials: ^5.0
- fractas/cookiepolicy: ^2
- hubertusanton/silverstripe-seo: ^5
- jonom/focuspoint: ^5
- jonom/silverstripe-betternavigator: ^6
- kinglozzer/metatitle: ^3
- silverstripe/login-forms: ^5
- silverstripe/recipe-blog: ^2
- silverstripe/recipe-cms: ^5
- silverstripe/recipe-core: ^5
- silverstripe/recipe-form-building: ^2
- silverstripe/recipe-plugin: ^2
- silverstripe/redirectedurls: ^3
- silverstripe/widgets: ^3
- symbiote/silverstripe-gridfieldextensions: ^4
- tractorcow/silverstripe-robots: ^4.1
- undefinedoffset/silverstripe-nocaptcha: ^2.4
- wildbit/swiftmailer-postmark: ^3.3
- wilr/silverstripe-googlesitemaps: ^3
Requires (Dev)
- deployer/deployer: ^7.3
- 5.x-dev
- 4.x-dev
- dev-dependabot/npm_and_yarn/themes/custom/cross-spawn-7.0.6
- dev-dependabot/npm_and_yarn/themes/custom/bootstrap-5.0.0
- dev-dependabot/npm_and_yarn/themes/custom/http-proxy-middleware-2.0.7
- dev-dependabot/npm_and_yarn/themes/custom/express-4.21.0
- dev-dependabot/npm_and_yarn/themes/custom/webpack-5.94.0
This package is auto-updated.
Last update: 2024-12-05 13:22:49 UTC
README
Base SilverStripe website install that contains all the modules we commonly use.
Creating a new project
Recipes can be introduced to any existing project (even if not created on a silverstripe base project)
SS5 Version:
$ composer init $ composer require dft/silverstripe-recipe:5.x-dev
SS4 Version (depreciated):
$ composer init $ composer require dft/silverstripe-recipe:4.x-dev
Alternatively you can create a new project based on an existing recipe
SS5 Version:
$ composer create-project dft/silverstripe-recipe ./myssproject 5.x-dev
SS4 Version (depreciated):
$ composer create-project dft/silverstripe-recipe ./myssproject 4.x-dev
Inlining recipes
You can "inline" either a previously installed recipe, or a new one that you would like to include dependencies for in your main project. By inlining a recipe, you promote its requirements, as well as its project files, up into your main project, and remove the recipe itself from your dependencies.
This can be done with either update-recipe
, which will update a recipe, or require-recipe
which will
install a new recipe.
Note that if you wish to run this command you must first install either a recipe via normal composer commands, or install the recipe plugin:
$ composer init $ composer require dft/silverstripe-recipe ^0.1 $ composer require-recipe dft/silverstripe-recipe ^1.0@dev
or
$ composer init $ composer require dft/silverstripe-recipe ^1.0@dev $ composer update-recipe dft/silverstripe-recipe
Further Docs
More comprehensive documentation can be found at the recipe plugin github page
Themes
This recipe installs multiple possible base themes, but also builds a "custom" theme that can be used to overwrite the default selected theme.
If you want to switch out the default base theme to an
alternative, it is recommended that you change bootstrap
in theme.yml
to your alternative, EG:
SilverStripe\View\SSViewer:
themes:
- 'custom'
- 'deferedimages'
- 'bootstrap' # Change this to your base theme
- '$default'
Webpack
The custom theme (and parent themes) are designed to use webpack to help package and manage CSS and JS requirements.
Alternativley you can just use the default SilverStripe way (add your own files to dist/css or dist/js) but you will have to manage combining and compressing them.
This is handled automatically via webpack
.
Getting Started
To get started using webpack to manage your JS and CSS requirements, first you have to install yarn
Once you have installed yarn, navigate to your theme dir:
# cd /path/to/my/project/themes/custom
Now install node modules (can take a little while)
# yarn install
Adding Custom CSS/JS
Next add your custom JS or CSS (SASS) to the relevent folders
(themes/custom/src/javascript
or themes/custom/src/scss
respectivley), if you add any new files, you will need to
import them in the following locations:
- SCSS Files are added to
themes/custom/src/scss/bundle.scss
- JS files will need to be mapped directly in
themes/custom/webpack.common.js
Finally, run one of the following command to transpile/minify your files
yarn dev
: Transpile all files for development purposes (do not minify)yarn build
: Transpile AND minify for production
Linting
Some linting functionality is included to help keep code tidy. If you want to lint/tidy your CSS/JS you can run the following:
yarn lint:styles
oryarn lint:styles:fix
Check or attempt to fix issues with SCSSyarn lint:scripts
oryarn lint:scripts:fix
Check or attempt to fix issues with JS