Skip to content

Commit e29c610

Browse files
authored
Merge branch '6-dev' into search_feature
2 parents 22a8c99 + 45f9034 commit e29c610

File tree

5 files changed

+135
-13
lines changed

5 files changed

+135
-13
lines changed

docs/backend/behaviors.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ If we were to represent the behavior of choosing the correct outlet adapter in P
332332

333333
This process of choosing the right adapter based on the information of the context and the requested interface implements the design pattern of an abstract factory.
334334

335+
```{hint} The notation `ISchuko(context)` is a shortcut for `getAdapter(context, ISchuko)`.
336+
It executes exactly the same logic behind the scenes with the same result.
337+
```
338+
335339
Similarly, using the {ref}`behavior code example <behavior-code-example>` above:
336340
337341
- You would call an abstract factory with `getAdapter(context, IPriceBehavior)` to get an adapter, `price_for_context`.

docs/classic-ui/csrf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ To add a token as an HTTP GET parameter to a link in a template, you can utilize
9090

9191
```html
9292
<tal:authenticator tal:define="token context/@@authenticator/token">
93-
<a href="${python:context.absolute_url()}/myprotected_view?_authenticator=${token}" />
93+
<a href="${python:context.absolute_url()}/myprotected_view?_authenticator=${token}" >Link to some view</a>
9494
</tal:authenticator>
9595
```
9696

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
r"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors#Identifying_the_issue",
8484
r"https://github.com/browserslist/browserslist#queries",
8585
r"https://github.com/nodejs/release#release-schedule",
86+
r"https://github.com/nvm-sh/nvm#install--update-script",
8687
r"https://github.com/plone/cookiecutter-zope-instance#options",
8788
r"https://github.com/plone/plone.app.contenttypes#migration",
8889
r"https://github.com/plone/plone.docker#for-basic-usage",
@@ -320,6 +321,7 @@ def source_replace(app, docname, source):
320321
source_replacements = {
321322
"{PLONE_BACKEND_MINOR_VERSION}": "6.0",
322323
"{PLONE_BACKEND_PATCH_VERSION}": "6.0.0.2",
324+
"{NVM_VERSION}": "0.39.3",
323325
}
324326

325327

docs/glossary.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@ Asynchronous JavaScript and XML
254254
The server will send a response back to the client, which is then rendered on the client side.
255255
256256
Yeoman
257-
A popular scaffolding tool similar to Plone's `mr.bob` or `ZopeSkel`.
258-
https://yeoman.io/
257+
[Yeoman](https://yeoman.io/) is a popular scaffolding tool similar to Plone's `mr.bob` or `ZopeSkel`.
259258
260259
CommonJS
261260
A JavaScript package standard, the equivalent of a Python wheel or egg.
@@ -501,6 +500,7 @@ Zope
501500
502501
Make
503502
make
503+
GNU make
504504
[GNU Make](https://www.gnu.org/software/make/) is a tool which controls the generation of executables and other non-source files of a program from the program's source files.
505505
506506
Make gets its knowledge of how to build your program from a file called the _makefile_, which lists each of the non-source files and how to compute it from other files.
@@ -576,4 +576,11 @@ Factory Type Information
576576
```{seealso}
577577
[`FactoryTypeInformation` class source code](https://github.com/zopefoundation/Products.CMFCore/blob/361a30e0c72a15a21f88433b8d5fc49331f36728/src/Products/CMFCore/TypesTool.py#L431)
578578
```
579+
580+
`nvm`
581+
Node Version Manager
582+
[`nvm`](https://github.com/nvm-sh/nvm/blob/master/README.md) allows you to quickly install and use different versions of node via the command line.
583+
584+
Node.js
585+
[Node.js®](https://nodejs.org/en/) is an open-source, cross-platform JavaScript runtime environment.
579586
```

docs/install/install-from-packages.md

Lines changed: 119 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,142 @@ You may host multiple Plone sites on the same server.
3737

3838
### Pre-requisites for installation
3939

40-
- Python 3.8, 3.9, or 3.10.
41-
- Cookiecutter
42-
- Node.JS
43-
- nvm
44-
- Yeoman
45-
- Yarn
46-
- GNU make
40+
- [Python](https://www.python.org/downloads/) 3.8, 3.9, or 3.10.
41+
- {term}`Cookiecutter`
42+
- {term}`nvm`
43+
- {term}`Node.js` LTS 16.x (see "Update" note)
44+
- {term}`Yeoman`
45+
- {term}`Yarn`
46+
- {term}`GNU make`
47+
48+
````{note}
49+
Update
50+
: [Node.js 18 is in LTS state as of 2022-10-25](https://github.com/nodejs/release#release-schedule), and Node.js 16 is now in maintenance mode.
51+
However, due to changes in internal SSL libraries, some Volto dependencies have been deprecated and need to be updated in order to continue working in Node.js 18, mainly [Webpack 4](https://github.com/webpack/webpack/issues/14532#issuecomment-947525539).
52+
You can still use it, but Node.js should be run under a special flag: `NODE_OPTIONS=--openssl-legacy-provider`.
53+
54+
```{seealso}
55+
Volto's pull request, [Support Node 18](https://github.com/plone/volto/pull/3699).
56+
```
57+
````
58+
59+
60+
(install-prerequisites-python-label)=
61+
62+
#### Python
4763

4864
Installing Python is beyond the scope of this documentation.
4965
However, it is recommended to use a Python version manager, [`pyenv`](https://github.com/pyenv/pyenv) that allows you to install multiple versions of Python on your development environment without destroying your system's Python.
5066

67+
68+
(install-prerequisites-cookiecutter-label)=
69+
70+
#### Cookiecutter
71+
5172
Install or upgrade {term}`Cookiecutter` in your user's Python:
5273

5374
```shell
5475
pip install --user --upgrade cookiecutter
5576
```
5677

57-
{ref}`Install nvm and Node.js documentation <frontend-getting-started-install-nvm-label>`.
5878

59-
{ref}`Install Yeoman documentation <frontend-getting-started-yeoman-label>`.
79+
(install-prerequisites-nvm-label)=
80+
81+
#### nvm
82+
83+
The following terminal session commands use `bash` for the shell.
84+
Adapt them for your flavor of shell.
85+
86+
```{seealso}
87+
See the [`nvm` install and update script documentation](https://github.com/nvm-sh/nvm#install--update-script).
88+
For the `fish` shell, see [`nvm.fish`](https://github.com/jorgebucaran/nvm.fish).
89+
```
90+
91+
1. Create your shell profile, if it does not exist.
92+
93+
```shell
94+
touch ~/.bash_profile
95+
```
96+
97+
2. Download and run the `nvm` install and update script, and pipe it into `bash`.
98+
99+
```shell
100+
curl -o- https://raw.githubusercontent.com/creationix/nvm/v{NVM_VERSION}/install.sh | bash
101+
```
102+
103+
3. Source your profile.
104+
Alternatively close the session and open a new one.
105+
106+
```shell
107+
source ~/.bash_profile
108+
```
109+
110+
4. Verify that the `nvm` version is that which you just installed or updated:
111+
112+
```shell
113+
nvm --version
114+
```
115+
116+
117+
(install-prerequisites-nodejs-label)=
118+
119+
#### Node.js
60120

61-
{ref}`Install Yarn documentation <frontend-getting-started-yarn-label>`.
121+
1. Install or update the supported LTS version of Node.js.
122+
This command also activates that version.
123+
124+
```shell
125+
nvm install 16
126+
```
127+
128+
2. Verify that the supported version of Node.js is activated.
129+
130+
```shell
131+
node -v
132+
```
133+
134+
135+
(install-prerequisites-yeoman-label)=
136+
137+
#### Yeoman
138+
139+
Install {term}`Yeoman`.
140+
141+
```shell
142+
npm install -g yo
143+
```
144+
145+
146+
(install-prerequisites-yarn-label)=
147+
148+
#### Yarn
149+
150+
Install the Yarn Classic version (not the latest 2.x one) using `npm`.
151+
152+
1. Open a terminal and type:
153+
154+
```shell
155+
npm install yarn@1
156+
```
157+
158+
2. Verify that Yarn v1.x.x is installed and activated.
159+
160+
```shell
161+
yarn -v
162+
```
163+
164+
165+
(install-prerequisites-make-label)=
166+
167+
#### Make
62168

63169
{term}`Make` comes installed on most Linux distributions.
64170
On macOS, you must first [install Xcode](https://developer.apple.com/xcode/resources/), then install its command line tools.
65171
On Windows, it is strongly recommended to [Install Linux on Windows with WSL](https://learn.microsoft.com/en-us/windows/wsl/install), which will include `make`.
66172

173+
Finally, it is a good idea to update your system's version of `make`, because some distributions, especially macOS, have an outdated version.
174+
Use your favorite search engine or trusted online resource for how to update `make`.
175+
67176
68177
(install-packages-install-label)=
69178

0 commit comments

Comments
 (0)