Create A New Project
We've created a starter kit that includes a lot of technical plumbing and defaults. To create a new project using this starter kit, navigate to the folder you'd like your project to be created in and enter the following into your terminal:
statamic new my-new-project schwartzmj/statamic-smj-starter-kit
After initializing your new project
Setup your .env file
- Run
cp .env.example .envin your terminal to copy the example environment file over to a fresh.envfile. - Update the following variables within your new
.envfile.APP_NAME— this is generally the "title" of the webpageAPP_URL— this should be the local URL for your development site (e.g. http://my-new-project.test)AKISMET_API_KEY— If you do not have an Akismet API key, get one from the Akismet Development PortalSTATAMIC_CACHE_TAGS_ENABLED— set tofalse. Normally we cache resource-heavy rendering like the navigation tags. If you do not set this to false, you will not see updates to these templates without clearing your application cache.
Clean up
- Delete
tailwind.config.js— we usetailwind.config.site.jsandtailwind.config.cp.jsinstead - Delete
webpack.mix.js— we use Vite. - Consider updating/deleting the contents of
README.md
Dev server
- Run
npm installto install Node dependencies. - Run
npm run devto start the development server. - On first page load, you will hit an error page. Simply follow the prompt to generate an application key and refresh the page.
Log In to the Control Panel
- Visit the
/cproute. Credentials are:user@example.compassword