madebyshape / craft-3
Craft CMS
Requires
- clubstudioltd/craft-asset-rev: 7.0.0
- craftcms/cms: 4.4.16.1
- craftcms/redactor: 3.0.4
- lewisjenkins/craft-dynamic-fields: 4.0.3
- mmikkel/retcon: 2.7.1
- nystudio107/craft-minify: 4.0.0-beta.2
- nystudio107/craft-retour: 4.1.12
- nystudio107/craft-seomatic: 4.0.30
- putyourlightson/craft-blitz: 4.5.0
- putyourlightson/craft-sprig: 2.6.2
- sebastianlenz/linkfield: 2.1.5
- solspace/craft-freeform: 4.1.6
- spacecatninja/imager-x: 4.2.1
- verbb/default-dashboard: 2.0.0
- verbb/super-table: 3.0.9
- vlucas/phpdotenv: ^3.4.0
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.24
- 2.0.23
- 2.0.22
- 2.0.21
- 2.0.20
- 2.0.19
- 2.0.17
- 2.0.16
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.1.0
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-craft-cms-4-webpack
- dev-craft-cms-3-webpack
This package is auto-updated.
Last update: 2024-04-18 11:03:43 UTC
README
Craft CMS 5 Starter
This is a Craft CMS 5.x starter MadeByShape use internally for projects, that we open sourced so anybody can use it.
The Stack
- Craft CMS 5.x Content management system
- DDEV Local development environment
- Vite 5.x Front end build tool with HMR
- Tailwind CSS 3.x Utility-first CSS framework
- Alpine.js 3.x Minimal JS framework
- Mailgun Email API
- Servd Craft CMS first hosting provider
Requirements
Features
- Templates
- Layout templates setup ready with header and footer globals
- Exception templates for 404, offline/maintenece and generic errors
- Page templates setup for use with matrix fields
- Email template for sending prettier system emails (Forgot password etc)
- Config
- Configs for all Craft CMS plugins
- Customised general config with required features that hook in to .env vars
- Env
- Customised .env file with Servd and Mailgun included
- Building
- HMR
- CSS and JS minified and purged
- Favicon is generated and auto inserted into the template
- Images compressed
- Sourcemaps generated
- Servd
- Setup to be used with Servd hosting platform
- Enabled for using static caching
- Caching
- Uses Blitz to handle server caching and warming
Plugins
Craft CMS
- Blitz
- Hyper
- SEOMatic
- Vite
- Sprig
- Formie
- Imager X
- Minify
- CKEditor
- Mailgun
- Servd Asset Storage
Tailwind CSS
- Aspect Ratio
Install
Create an empty folder and CD to it in terminal (If you plan to use Option 1 or 2).
1a. Option 1: Composer
If you have composer installed locally, open terminal and run:
composer create-project madebyshape/craft-cms
1b. Option 2: Git
You can clone the repo from Github using Git CLI:
git clone git@github.com:madebyshape/craft-cms.git
1c. Option 3: Manual
Download a copy of this repo to your computer using the Code
button above, and choosing Download ZIP
. Move these files to your empty folder.
2. Start DDEV, Install Craft CMS and dependencies
Firstly, edit .ddev/config.yaml
and change the name
to your project name.
Then, there are a few CLI commands (See more) we've created that allow starting DDEV, installing Craft CMS and installing dependencies (Node particularly). The one to get you started:
make install
3. Starting Vite
Once you've followed step 2 and it's successfully ran through the steps, you'll need to start Vite which allows you to start using front end tooling:
make dev
CLI commands
We've create a few commands to make development easier. All these commands are ran in terminal:
Command | Description |
---|---|
make install |
Starts DDEV, Install Craft CMS and dependencies. |
make setup |
Use when starting to work on your project especially if your working in a team. |
make dev |
Starts Vite development process. |
make prod |
Run on production to start Vite build process - minify, compress etc. |
make clean |
Removes composer and node files ready for a clean install. |
make update |
Smaller command that runs ddev exec php craft update all . |
make up 💅 |
Runs project config apply and migrations apply. |
make pull |
Pulls a database dump from a remote Servd environment into the local database. |
Nice to know
Database
To access the database inside the DDEV environment, you can use TablePlus. You can use the following command to open TablePlus to export/import:
ddev tableplus
Exiting Vite
One thing that confused me in side the terminal was how to exi Vite once running a CLI command like make dev
. You can't use ctrl + c
like you would in a normal terminal. You need to use:
q + enter
HTTPS recommended
There is a few issues getting Vite, DDEV and Craft CMS running nicely together over HTTP, so always make sure you are using HTTPS. For DDEV just run:
ddev stop --all mkcert -install ddev start ddev launch