-
Install Craft CMS
- Run
composer create-project craftcms/craft <PROJECT_NAME>
- Run
-
Setup Craft CMS
- Once composer has installed the project
cd <PROJECT_NAME>
- Create a new database in your local environment before running
./craft setup
- Run
./craft setup
and follow the prompts.
- Once composer has installed the project
This step is a normal Craft CMS install / setup. For more detailed instructions or if your having problems, refer to there docs:
- Download this Repo
- We're going to download the zip of this repo rather than
clone
it because we're going to move it into the existing Craft CMS project folder we just created. - After downloading this repo extract it and move the folder's contents into the Craft CMS project that you just created. It will ask you if you want to override the existing
templates
directory, answer yes to this.
- We're going to download the zip of this repo rather than
- From the root of your Craft CMS project, run
yarn
or if you don't haveyarn
, runnpm install
. - Now to compile run either
yarn run watch
ornpm run watch
- To have your code auto refresh in the browser on save, be sure to add
:3000
to your base URL when viewing the front-end of your site.
-
/templates
now contains a very basiclayouts/app.twig
andindex.twig
to start from. -
Your site's CSS/JS assets will be compiled to
/web/assets/dist/
-
Custom Javascript to be written in
/src/js/site.js
-
Custom SCSS to be written in
/src/scss/
usemain.scss
to import otherscss
files you create.