You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin-guide/add-ons.md
+94-96Lines changed: 94 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,92 +18,48 @@ The Volto frontend has its own system of add-ons using Node.js packages.
18
18
See {doc}`/volto/development/add-ons/index`.
19
19
```
20
20
21
-
## Install an add-on from PyPI
22
-
23
-
For instructions to install an add-on that is released on {term}`PyPI`, select the tab below according to your Python package manager.
24
-
25
-
```{tip}
26
-
Select the tab for uv if you have a project that was created using Cookieplone, and you have `managed = true` set in the `[tool.uv]` section of the file {file}`backend/pyproject.toml`.
27
-
Select the tab for pip if you have a project that was created using Cookieplone that does not have this setting.
28
-
```
29
-
30
-
`````{tab-set}
31
-
32
-
````{tab-item} uv
33
-
34
-
Add the name of your add-on in the file {file}`backend/pyproject.toml` in the section `dependencies`.
35
-
This example adds [`collective.easyform`](https://pypi.org/project/collective.easyform/).
21
+
(install-an-add-on-from-pypi-label)=
36
22
37
-
```{code-block} toml
38
-
:emphasize-lines: 6
39
-
dependencies = [
40
-
"Products.CMFPlone==6.1.1",
41
-
"plone.api",
42
-
"plone.classicui",
43
-
"plone.app.caching",
44
-
"collective.easyform==4.4.0",
45
-
]
46
-
```
23
+
## Install an add-on from PyPI
47
24
48
-
```{tip}
49
-
Including the add-on version, or "pinning a version", ensures that it won't unintentionally get upgraded in the future.
50
-
```
25
+
This section describes how to install an add-on that is released on {term}`PyPI`.
51
26
52
-
Also add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` to make sure its configuration will be loaded.
To actually download and install the new add-on, run the following command.
32
+
First, configure your project according to the instructions in the tabbed interface below.
33
+
Select the tab according to the method you used to create your project.
62
34
63
-
```shell
64
-
make backend-build
65
-
```
66
-
67
-
````
68
-
69
-
````{tab-item} pip
35
+
`````{tab-set}
36
+
````{tab-item} Cookieplone
37
+
:sync: cookieplone
70
38
71
39
Add the name of your add-on in the file {file}`backend/pyproject.toml` in the section `dependencies`.
72
40
This example adds [`collective.easyform`](https://pypi.org/project/collective.easyform/).
73
41
74
42
```{code-block} toml
75
43
:emphasize-lines: 6
76
44
dependencies = [
77
-
"Products.CMFPlone==6.1.1",
45
+
"Products.CMFPlone==6.1.4",
78
46
"plone.api",
79
47
"plone.classicui",
80
48
"plone.app.caching",
81
-
"collective.easyform==4.4.0",
49
+
"collective.easyform==4.5.1",
82
50
]
83
51
```
84
52
85
-
```{tip}
86
-
Including the add-on version, or "pinning a version", ensures that it won't unintentionally get upgraded in the future.
87
-
```
88
-
89
-
Also add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` to make sure its configuration will be loaded.
53
+
To configure the add-on to load, in the file {file}`backend/instance.yaml`, under the key `default_context`, for the key `zcml_package_includes`, set its value to the add-on's name.
To actually download and install the new add-on, run the following command.
99
-
100
-
```shell
101
-
make backend-build
102
-
```
103
-
104
59
````
105
60
106
61
````{tab-item} Buildout
62
+
:sync: buildout
107
63
108
64
Update the file {file}`buildout.cfg`.
109
65
This example uses [`collective.easyform`](https://pypi.org/project/collective.easyform/).
@@ -125,24 +81,46 @@ eggs =
125
81
collective.easyform
126
82
127
83
[versions]
128
-
collective.easyform = 4.2.1
84
+
collective.easyform = 4.5.1
129
85
```
86
+
````
87
+
`````
130
88
131
89
```{tip}
132
-
Including the add-on version, or "pinning a version", ensures that it won't unintentionally get upgraded in the future.
90
+
You can control which version of an add-on to install through "version pinning."
91
+
92
+
- Specify the add-on version to avoid its unintentional upgrade.
93
+
- Leave it off to always install the latest version.
133
94
```
134
95
96
+
97
+
(install-the-add-on-pypi-label)=
98
+
99
+
### Install the add-on
100
+
101
+
Stop the backend with {kbd}`ctrl-c`.
102
+
135
103
To actually download and install the new add-on, run the following command.
136
104
105
+
`````{tab-set}
106
+
````{tab-item} Cookieplone
107
+
:sync: cookieplone
108
+
137
109
```shell
138
-
bin/buildout -N
110
+
make backend-build
139
111
```
140
-
141
112
````
142
113
114
+
````{tab-item} Buildout
115
+
:sync: buildout
116
+
117
+
```shell
118
+
bin/buildout -N
119
+
```
120
+
````
143
121
`````
144
122
145
-
Now restart the backend.
123
+
Next, restart the backend.
146
124
147
125
```{seealso}
148
126
{doc}`run-plone`
@@ -159,18 +137,26 @@ At the bottom of the page, you should see the heading {guilabel}`Add-on Configur
159
137
160
138
## Install an add-on from source
161
139
162
-
An unreleased add-on can be installed from a source control system such as GitHub.
140
+
This section describes how to install an unreleased add-on from a source control system, such as GitHub.
141
+
142
+
143
+
(configure-add-on-installation-source-label)=
144
+
145
+
### Configure add-on installation
163
146
164
-
For instructions to install an add-on that is released on {term}`PyPI`, select the tab below according to your Python package manager.
147
+
First, configure your project according to the instructions in the tabbed interface below.
148
+
Select the tab according to your Python package manager.
165
149
166
150
```{tip}
167
-
Select the tab for uv if you have a project that was created using Cookieplone, and you have `managed = true` set in the `[tool.uv]` section of the file {file}`backend/pyproject.toml`.
168
-
Select the tab for pip if you have a project that was created using Cookieplone that does not have this setting.
151
+
For projects created with Cookieplone, select either the tab labeled:
152
+
153
+
- {guilabel}`uv` if the file {file}`backend/pyproject.toml`, under the table `[tool.uv]` has the setting of `managed = true`
154
+
- {guilabel}`pip` if your project doesn't have this setting
169
155
```
170
156
171
157
`````{tab-set}
172
-
173
158
````{tab-item} uv
159
+
:sync: uv
174
160
175
161
Clone the repository into a local directory.
176
162
This example uses [`collective.easyform`](https://pypi.org/project/collective.easyform/).
@@ -186,43 +172,32 @@ cd backend
186
172
uv add --editable ../collective.easyform
187
173
```
188
174
189
-
```{note}
190
-
When installing an add-on from source, it's best not to pin a version.
191
-
This way you always get the version that's currently available in the source control system.
192
-
```
193
-
194
-
Next add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` so that its configuration will load.
175
+
To configure the add-on to load, in the file {file}`backend/instance.yaml`, under the key `default_context`, for the key `zcml_package_includes`, set its value to the add-on's name.
Add the name of your add-on in the file {file}`backend/pyproject.toml` in the section `dependencies`.
207
187
This example adds [`collective.easyform`](https://pypi.org/project/collective.easyform/).
208
188
209
189
```{code-block} toml
210
190
:emphasize-lines: 6
211
191
dependencies = [
212
-
"Products.CMFPlone==6.1.1",
192
+
"Products.CMFPlone==6.1.4",
213
193
"plone.api",
214
194
"plone.classicui",
215
195
"plone.app.caching",
216
196
"collective.easyform",
217
197
]
218
198
```
219
199
220
-
```{note}
221
-
When installing an add-on from source, it's best not to pin a version.
222
-
This way you always get the version that's currently available in the source control system.
223
-
```
224
-
225
-
Next add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` so that its configuration will load.
200
+
To configure the add-on to load, in the file {file}`backend/instance.yaml`, under the key `default_context`, for the key `zcml_package_includes`, set its value to the add-on's name.
226
201
227
202
```yaml
228
203
default_context:
@@ -242,18 +217,10 @@ extras=test
242
217
The {file}`mx.ini` file configures a tool called {term}`mxdev`.
243
218
For an explanation of why Plone uses `mxdev`, see {ref}`manage-packages-mxdev-label`.
244
219
```
245
-
246
-
Stop the backend with {kbd}`ctrl-c`.
247
-
248
-
To actually download and install the new add-on, run the following command.
249
-
250
-
```shell
251
-
make backend-build
252
-
```
253
-
254
220
````
255
221
256
222
````{tab-item} Buildout
223
+
:sync: buildout
257
224
258
225
Update the file {file}`buildout.cfg`.
259
226
This example uses [`collective.easyform`](https://pypi.org/project/collective.easyform/).
0 commit comments