Use this CLI: https://github.com/nickmoreton/wagtail-start to start a new Wagtail CMS site.
- Remove the default welcome page
- Add node and npm to the project
- Add webpack to the project
It uses the Wagtail start command and then alters the sites folder and file layout. Optionally, you can also include a basic webpack setup to build and compile the front end code.
The site will include only a base home page and is ready for development.
poetry run new [project_name]
The project will be created in it's own directory inside the parent directory of the CLI tool.
New site development
Once the site is generated, you can start developing it further.
Install the dependencies, use your preferred method of setting up a virtual environment.
python manage.py migrate python manage.py createsuperuser python manage.py runserver
- Install the dependencies: (nvm use if you have nvm installed) and npm install.
- Run the dev server: npm start.
- Open the site in your browser: http://localhost:3000.
- For production build: npm run build.