This is a boilerplate for a Craft 5 CMS install with a few plugins already installed, custom file structure, and some pages with nav and a footer.
Firstly you need to create a database on your localhost.
To set up the boilerplate, you can use composer:
composer create-project fortytwo-studio/craft-cms-boilerplate [path]
- Alternatively you can clone the repo: https://github.com/fortytwostudio/craft-cms-boilerplate
- Run
composer install- The
post-install-cmdhook will run the setup, db import, npm install and finally removes the post-install-cmd scripts
- The
- Run
npm install
ViteJs is utilised in the project to watch and build sass and js.
Therefore you will need to have vite-cli installed to rebuild files. You can install it with node: npm install -D vite.
After that, just use npm run dev in the terminal to turn on the file watchers.
!! Before deploying changes to staging or production, make sure to run npm run build !!
- craftcms/aws-s3
- craftcms/ckeditor
- solspace/craft-freeform
- johnhenry/matrix-block-anchor
- verbb/navigation
- ether/seo
- nystudio107/craft-vite
- wrav/oembed
- fortytwo-studio/cookie-consent
Tailwind is installed as a node module and is imported via:
- CSS:
@webroot/src/css/app.css - JS:
@webroot/src/js/app.js
Preline is installed as a node module and is imported and initialised in:
- CSS:
@webroot/src/css/app.css - JS:
@webroot/src/js/app.js
vanilla-lazyload is installed as a node module and is imported and initialised in:
@webroot/src/js/libraries/lazy-load.js
infinite-scroll is installed as a node module and is imported and initialised in:
@webroot/src/js/app.js
countup.js is installed as a node module and is imported and initialised in:
@webroot/src/js/components/stats.js
JQuery is installed as a node module. Can be imported into JS files via:
import $ from 'jquery';