Skip to content

plone/cookieplone-templates

Plone Logo

Cookieplone Templates

License Black code style

About

This project is a collection of templates for Plone integrators to use through Cookieplone.

Installation 💾

Set up your system with Plone's Prerequisites for installation.

Choose a template 🛠️

Select a template with the following command:

uvx cookieplone
╭───────────────────────────────────────────────────────────── cookieplone ──────────────────────────────────────────────────────────────╮
│                                                                                                                                        │
│                                  *******                                                                                               │
│                              ***************                                                                                           │
│                            ***             ***        *********     ***                                    ***                         │
│                          ***    ***          ***      ***********   ***                                   * R *                        │
│                         ***    *****          ***     ***      ***  ***                                    ***                         │
│                        ***      ***            ***    ***       *** ***       ****     ***  ***       ****                             │
│                        ***               ***   ***    ***      ***  ***     ********   *********    ********                           │
│                        ***              *****  ***    ***********   ***    ***    ***  ****   ***  ***    ***                          │
│                        ***      ***      ***   ***    *********     ***    ***    ***  ***    ***  **********                          │
│                         ***    *****          ***     ***           ***    ***    ***  ***    ***  *********                           │
│                          ***    ***          ***      ***           ****   ***    ***  ***    ***  ***    ...                          │
│                            ***             ***        ***            *****  ********   ***    ***   ********                           │
│                              ***************          ***              ***    ****     ***    ***     ****                             │
│                                  *******                                                                                               │
│                                                                                                                                        │
│ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │                                                             Templates                                                              │ │
│ │ ┏━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ │
│ │ ┃ # ┃ Title                                     ┃ Description                                                                    ┃ │ │
│ │ ┡━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ │
│ │ │ 1 │ Volto Project                             │ Create a new Plone project that uses the Volto frontend                        │ │ │
│ │ │ 2 │ Classic UI Project                        │ Create a new Plone project that uses Classic UI                                │ │ │
│ │ │ 3 │ Backend Add-on for Plone                  │ Create a new Python package to be used with Plone                              │ │ │
│ │ │ 4 │ Frontend Add-on for Plone                 │ Create a new Node package to be used with Volto                                │ │ │
│ │ │ 5 │ Add-on for Plone (Backend + Volto)        │ Create a new codebase for a Plone add-on that includes both backend and Volto  │ │ │
│ │ │   │                                           │ frontend                                                                       │ │ │
│ │ │ 6 │ Seven Frontend Add-on for Plone           │ Create a new Node package to be used with Seven                                │ │ │
│ │ │ 7 │ Documentation scaffold for Plone projects │ Create a new documentation scaffold for Plone projects                         │ │ │
│ │ └───┴───────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘ │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Select a template [1/2/3/4/5/6/7] (1):

Publish to Git service provider

To publish your project to your Git service provider, first create an empty remote repository with your Git service provider. Then navigate to the root of your generated project folder. Finally, issue the following commands.

Note

If your remote repository is private, you'll need to manage authorization when you push commits upstream.

git status
git commit -m "first commit"
git remote add origin https://<git_service_provider>/<organization_or_username>/<project_slug>.git
git branch -M main
git push

Your remote repository should now be populated with your generated project.

Publish documentation to Read the Docs

The Cookieplone template documentation_starter supports publishing documentation and pull request preview builds on Read the Docs.

First, create an account on Read the Docs, then follow their documentation to add a documentation project and configure pull request previews.

Next, update your documentation files. Search for the string MY_READTHEDOCS_PROJECT_SLUG throughout your project, and replace it your project's slug that Read the Docs assigned to your project.

Finally, commit and push your changes to your remote repository.

Read the Docs will build documentation and with the next pull request, will build a pull request preview and insert a link to the preview in your pull request.

Note

It's currently not supported to check for a unique slug on Read the Docs before generating your project, especially if you set up a private repository.

Contribute 🤝

We welcome contributions to cookieplone-templates.

You can create an issue in the issue tracker, or contact a maintainer.

Development requirements

See Installation.

For source control through Git and continuous integration and delivery (CI/CD), you'll also need a Git repository either under your personal or organization's account. Both GitHub and GitLab are currently supported Git repository and CI/CD service providers. However, only GitHub is currently supported for documentation hosting.

Setup

Create a local Python virtual environment with the following command.

make install

Run the checked out branch of cookieplone-templates.

COOKIEPLONE_REPOSITORY=~/YOUR_PATH_TO/cookieplone-templates uvx cookieplone project --no-input

Run a remote branch of cookieplone-templates.

COOKIEPLONE_REPOSITORY_TAG=<REMOTE_BRANCH_NAME> uvx cookieplone

Format the codebase

make format

Format the templates

make format_templates

Run tests

pytest is this package's test runner.

Run all tests with the following command.

make test

Run all tests, but stop on the first error and open a pdb session with the following command.

uv run pytest -x --pdb

Run only tests that match test_template_has_required_keys with the following command.

uv run pytest -k test_template_has_required_keys

Run only tests that match test_template_has_required_keys, but stop on the first error and open a pdb session with the following command.

uv run pytest -k test_template_has_required_keys -x --pdb

Releasing 🏷️

Releases of cookieplone-templates use CalVer versioning in the format YYYYMMDD.N, where N is a sequential counter that disambiguates multiple releases on the same day (e.g. 20260319.1).

Each release:

  • Generates and commits a changelog from towncrier news fragments.
  • Creates a Git tag matching the version.
  • Publishes a GitHub release with the changelog as its body.

Preview the changelog

Before releasing, preview what the changelog will look like without making any changes:

make changelog

Publish a new release

When ready to release, run:

make release

This will:

  1. Determine the next CalVer version.
  2. Show a changelog preview and prompt for confirmation.
  3. Generate and commit the changelog.
  4. Push the tag to the remote.
  5. Create the GitHub release.

Note

A valid GITHUB_TOKEN with write access to the repository must be present in your environment.

License 📜

This project is licensed under the MIT License.

Let's get building! 🚀

Happy coding!

About

Plone templates used with cookieplone

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors