/guide

A website to teach Wagtail CMS to content editors, moderators and administrators.

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Guide

Guide is a website to help content editors, moderators, administrators, and other users learn how to use the Wagtail content management system (CMS).

The Wagtail guide will ultimately include:

  • Tutorials
  • How-to articles
  • Reference materials
  • Walkthroughs and visual learning materials

You can learn more about the documentation system here.

Table of Contents

Installation

We assume that you have basic knowledge of Node/Webpack and Python/Django/Wagtail in these instructions. We recommend you develop Wagtail Guide locally on your machine using venv and fnm to ensure you are on the correct Node version.

Dependencies

  • Git
  • Python >= 3.9
  • Poetry >= 1.2.2
  • Node (see .nvmrc for version)

Setting up Wagtail guide in a virtual environment

Run:

python -V

Confirm that the output is showing version Python 3.9 (or higher). If not, you may have multiple versions of Python installed on your system and will need to switch to the appropriate version when creating the virtual environment.

With the Python version output confirmed, install Poetry.

Now we're ready to set up the guide project:

cd ~/dev [or your preferred dev directory]
git clone https://github.com/wagtail/guide.git
cd guide
make backend
make frontend
make buildfixtures

Once the backend and frontend have been set up, you can run the development server with:

make run

If everything worked, http://127.0.0.1:8000 should show you a welcome page.

You can access the administrative area at http://127.0.0.1:8000/admin and log in using the credentials you created during the backend setup.

To activate Poetry's virtual environment, run:

poetry shell

To generate and compile translation strings, run:

make makemessages
make compilemessages

Or both, in a single command:

make translations

Setting up development with Docker

  1. Create a .env file in the project root containing these variables, you can adjust the values to your preferences:
    ALLOWED_HOSTS=localhost
    PORT=8000
    SECRET_KEY=some-random-secret
    DJANGO_SETTINGS_MODULE=apps.guide.settings.dev
    
  2. Build the image by running the make docker-build command.
  3. Run the container with make docker-run.
  4. Run the init script in the container: make docker-init
  5. You should now have access to the project in your browser at http://localhost:8000

Gitpod

With Gitpod you can deploy a ready-to-code Wagtail Guide development environment with a single click to evaluate the code.

Open in Gitpod

Steps:

  1. Click the Open in Gitpod button.
  2. Relax: a development environment with an active Wagtail Guide site will be created for you.
  3. Login at /admin/ with username admin and password changeme

Contributing

If you're a Python or Django developer, fork the repo and join us. You'll find answers to many common new contributor questions in our contributing guidelines.

Development

  • Run formatting (Black & Prettier) make format
  • Run linting (Flake8, isort, Black, Prettier, Eslint) make lint
  • Run tests make test

Other Notes

Google Summer of Code

This project is one of three Wagtail projects being sponsored by Google as a part of Google Summer of Code 2022. The team for this project includes:

Contributor

Mentors

You can learn more about our Google Summer of Code project in Google Summer of Code: Wagtail Editor Guide, Wagtail CMS projects for Google Summer of Code 2022 or on our wiki page.