Skip to content

Commit 7bb05f9

Browse files
committed
Update admin-guide/add-ons.md
1 parent 43d90ef commit 7bb05f9

2 files changed

Lines changed: 83 additions & 85 deletions

File tree

docs/admin-guide/add-ons.md

Lines changed: 80 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ The Volto frontend has its own system of add-ons using Node.js packages.
1818
See {doc}`/volto/development/add-ons/index`.
1919
```
2020

21+
## Install an add-on from PyPI
2122

22-
## Cookieplone
23+
For instructions to install an add-on that is released on {term}`PyPI`, select the tab below according to your Python package manager.
2324

24-
Use the following instructions if you installed Plone with Cookieplone.
25+
```{tip}
26+
Select the tab for uv if you have a project that was created using Cookieplone.
27+
```
2528

29+
`````{tab-set}
2630
27-
### Install an add-on
31+
````{tab-item} uv
2832
2933
Add the name of your add-on in the file {file}`backend/pyproject.toml` in the section `dependencies`.
3034
This example adds [`collective.easyform`](https://pypi.org/project/collective.easyform/).
@@ -59,127 +63,106 @@ To actually download and install the new add-on, run the following command.
5963
make backend-build
6064
```
6165
62-
Now restart the backend.
63-
64-
```{seealso}
65-
{doc}`run-plone`
66-
```
67-
68-
In your web browser, and assuming you are currently logged in as an administrator, visit the URL http://localhost:8080/Plone/prefs_install_products_form.
69-
70-
Then click the {guilabel}`Install` button next to your add-on to complete installation of the add-on.
71-
72-
Some add-ons have configuration options.
73-
To configure such add-ons, return to the {guilabel}`Site Setup` control panel.
74-
At the bottom of the page, you should see the heading {guilabel}`Add-on Configuration`, and a control panel to configure the add-on that you just installed.
66+
````
7567
68+
````{tab-item} Buildout
7669
77-
### Install an add-on from source
78-
79-
An add-on can be installed from a source control system such as GitHub.
80-
81-
Add a line with the name of your add-on in the file {file}`backend/requirements.txt`.
70+
Update the file {file}`buildout.cfg`.
8271
This example uses [`collective.easyform`](https://pypi.org/project/collective.easyform/).
8372
84-
```
85-
collective.easyform
86-
```
87-
88-
```{note}
89-
When installing an add-on from source, it's best not to pin a version.
90-
This way you always get the version that's currently available in the source control system.
91-
```
92-
93-
Next add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` so that its configuration will load.
73+
```cfg
74+
[buildout]
75+
extends =
76+
https://dist.plone.org/release/6-latest/versions.cfg
9477
95-
```yaml
96-
default_context:
97-
zcml_package_includes: project_title, collective.easyform
98-
```
78+
parts =
79+
instance
9980
100-
Finally, add the package's source to the file {file}`mx.ini`.
81+
[instance]
82+
recipe = plone.recipe.zope2instance
83+
user = admin:admin
84+
http-address = 8080
85+
eggs =
86+
Plone
87+
collective.easyform
10188
102-
```cfg
103-
[collective.easyform]
104-
url=git@github.com:collective/collective.easyform.git
105-
branch=dev-branch-name
106-
extras=test
89+
[versions]
90+
collective.easyform = 4.2.1
10791
```
10892
109-
```{seealso}
110-
The {file}`mx.ini` file configures a tool called {term}`mxdev`.
111-
See the [documentation of `mxdev` in its README.md](https://github.com/mxstack/mxdev/blob/main/README.md) for complete information.
93+
```{tip}
94+
Including the add-on version, or "pinning a version", ensures that it won't unintentionally get upgraded in the future.
11295
```
11396
114-
Stop the backend with {kbd}`ctrl-c`.
115-
11697
To actually download and install the new add-on, run the following command.
11798
11899
```shell
119-
make backend-build
100+
bin/buildout -N
120101
```
121102
103+
````
104+
105+
`````
106+
122107
Now restart the backend.
123108

124109
```{seealso}
125110
{doc}`run-plone`
126111
```
127112

128113
In your web browser, and assuming you are currently logged in as an administrator, visit the URL http://localhost:8080/Plone/prefs_install_products_form.
129-
An upgrade step might need to be performed in the Plone control panel.
130-
Follow the upgrade information, if present.
131-
Else click the {guilabel}`Install` button to complete installation of the add-on.
132114

115+
Then click the {guilabel}`Install` button next to your add-on to complete installation of the add-on.
116+
117+
Some add-ons have configuration options.
118+
To configure such add-ons, return to the {guilabel}`Site Setup` control panel.
119+
At the bottom of the page, you should see the heading {guilabel}`Add-on Configuration`, and a control panel to configure the add-on that you just installed.
133120

134-
## Buildout
135121

136-
Use the following instructions if you installed Plone with Buildout.
122+
## Install an add-on from source
137123

138-
### Install an add-on
124+
An unreleased add-on can be installed from a source control system such as GitHub.
139125

140-
Update the file {file}`buildout.cfg`.
141-
This example uses [`collective.easyform`](https://pypi.org/project/collective.easyform/).
126+
For instructions to install an add-on that is released on {term}`PyPI`, select the tab below according to your Python package manager.
142127

143-
```cfg
144-
[buildout]
145-
extends =
146-
https://dist.plone.org/release/6-latest/versions.cfg
128+
```{tip}
129+
Select the tab for uv if you have a project that was created using Cookieplone.
130+
```
147131

148-
parts =
149-
instance
132+
`````{tab-set}
150133
151-
[instance]
152-
recipe = plone.recipe.zope2instance
153-
user = admin:admin
154-
http-address = 8080
155-
eggs =
156-
Plone
157-
collective.easyform
134+
````{tab-item} uv
158135
159-
[versions]
160-
collective.easyform = 4.2.1
161-
```
136+
Clone the repository into a local directory.
137+
This example uses [`collective.easyform`](https://pypi.org/project/collective.easyform/).
162138
163-
```{tip}
164-
Including the add-on version, or "pinning a version", ensures that it won't unintentionally get upgraded in the future.
139+
```shell
140+
git clone git@github.com:collective/collective.easyform.git
165141
```
166142
167-
To actually download and install the new add-on, run the following command.
143+
Add the local directory to your uv project as an editable package.
168144
169145
```shell
170-
bin/buildout
146+
cd backend
147+
uv add --editable ../collective.easyform
171148
```
172149
173-
Then restart your instance.
174-
175-
```{seealso}
176-
{doc}`run-plone`
150+
```{note}
151+
When installing an add-on from source, it's best not to pin a version.
152+
This way you always get the version that's currently available in the source control system.
177153
```
178154
155+
Next add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` so that its configuration will load.
179156
180-
### Install an add-on from source
157+
```yaml
158+
default_context:
159+
zcml_package_includes: project_title, collective.easyform
160+
```
161+
162+
Stop the backend with {kbd}`ctrl-c`.
163+
````
181164
182-
You can install an add-on from a source control system such as GitHub.
165+
````{tab-item} Buildout
183166
184167
Update the file {file}`buildout.cfg`.
185168
This example uses [`collective.easyform`](https://pypi.org/project/collective.easyform/).
@@ -213,12 +196,24 @@ To actually download and install the new add-on, run the following command.
213196
bin/buildout
214197
```
215198
216-
Then restart your instance.
217-
218199
```{seealso}
219-
{doc}`run-plone`
200+
This approach uses the [`mr.developer`](https://pypi.org/project/mr.developer/) Buildout extension.
220201
```
221202
203+
````
204+
205+
`````
206+
207+
Now restart the backend.
208+
222209
```{seealso}
223-
This approach uses the [`mr.developer`](https://pypi.org/project/mr.developer/) Buildout extension.
210+
{doc}`run-plone`
224211
```
212+
213+
In your web browser, and assuming you are currently logged in as an administrator, visit the URL http://localhost:8080/Plone/prefs_install_products_form.
214+
215+
Then click the {guilabel}`Install` button next to your add-on to complete installation of the add-on.
216+
217+
Some add-ons have configuration options.
218+
To configure such add-ons, return to the {guilabel}`Site Setup` control panel.
219+
At the bottom of the page, you should see the heading {guilabel}`Add-on Configuration`, and a control panel to configure the add-on that you just installed.

docs/glossary.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ pyenv
104104
Python version management.
105105
[pyenv](https://github.com/pyenv/pyenv) lets you easily switch between multiple versions of Python.
106106
107+
PyPI
108+
The [Python Package Index](https://pypi.org/) is a repository of software for the Python programming language.
109+
107110
uv
108111
[uv](https://docs.astral.sh/uv/) is a Python package and project manager, written in Rust.
109112

0 commit comments

Comments
 (0)