bobtemplates.plone
provides mr.bob templates to generate packages for Plone projects.
Note
With the plonecli, we have a nice command line client for bobtemplates.plone. We highly recommend to use the plonecli, because it adds auto completion and some nice helpers to bobtemplates.plone.
Package created with bobtemplates.plone
use the current best-practices when creating an add-on. It also support's GIT by default, to keep track of changes one is doing with the bobtemplates.
- addon
- buildout (useful setup a development buildout or to test new pending Plone versions)
These templates are meant to be used inside a package which was created by the addon template.
- behavior
- content_type
- controlpanel
- form
- indexer
- mockup_pattern
- portlet
- restapi_service
- subscriber
- svelte_app
- theme
- theme_barceloneta
- theme_basic
- upgrade_step
- view
- viewlet
- vocabulary
Add-on's created with bobtemplates.plone
are tested to work in Plone >= 5.2 and Python >= 3.7.
the only exceptions are the theming templates. Those are Plone 6 only, because the markup and Diazo rules have changed.
If you need to create Plone packages for older versions of Plone and Python, please use bobtemplates.plone 5.x. It should work on Linux, Mac and Windows.
Full documentation for end users and template developers can be found on bobtemplatesplone.readthedocs.io.
For easy usage see: plonecli
You can install bobtemplates.plone as every other normal Python package with pip user global or inside a virtualenv or better with pipx.
pip install bobtemplates.plone --user
pipx installs bobtemplates.plone and all dependencies in a global isolated virtualenv.
pipx install bobtemplates.plone
You can also install bobtemplates.plone
with pip in a virtualenv.
If you don't have an active virtualenv, you can create one inside your project directory.
python3 -m venv venv
Then either activate the virtualenv:
source ./venv/bin/activate
or just use the binaries directly inside the bin folder as below:
./venv/bin/pip install bobtemplates.plone
As bobtemplates.plone is a template for mr.bob, we use mrbob to run the templates.
If you are using pipx or have bobtemplates.plone globally installed, you can just use mrbob directly.
mrbob bobtemplates.plone:addon -O src/collective.foo
If you are using an unactivated virtualenv, you can use mrbob like this:
./venv/bin/mrbob bobtemplates.plone:addon -O src/collective.foo
If you are using an activated virtualenv, you can use mrbob like this:
Activate your virtualenv:
source venv/bin/activate
mrbob bobtemplates.plone:addon -O src/collective.foo
This will create your Plone package inside the src
directory.
See the documentation of mr.bob for further information.
You can set all mr.bob configuration parameters in your ~/.mrbob file.
Here is an example:
[mr.bob]
verbose = False
[variables]
author.name = Maik Derstappen
author.email = [email protected]
author.github.user = MrTango
plone.version = 5.1.3-pending
#package.git.init = y
#package.git.autocommit = n
#package.git.disabled = n
[defaults]
dexterity_type_global_allow = n
dexterity_type_filter_content_types = y
dexterity_type_activate_default_behaviors = n
dexterity_type_supermodel = n
- Issue Tracker: https://github.com/plone/bobtemplates.plone/issues
- Source Code: https://github.com/plone/bobtemplates.plone
- Documentation: https://docs.plone.org/develop/addons/bobtemplates.plone/docs/ or https://bobtemplatesplone.readthedocs.io/en/latest/
If you are having issues, please let us know. Just open an issue here.