Skip to content

Commit a3dcc12

Browse files
authored
Merge branch '6.0' into gforcada-patch-1
2 parents 0265919 + e320178 commit a3dcc12

28 files changed

+414
-217
lines changed

.github/ISSUE_TEMPLATE/new-issue-form.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ body:
1717
id: description
1818
attributes:
1919
label: Description
20-
description: Include include screenshots and any other helpful information.
20+
description: Include screenshots and any other helpful information.
2121
validations:
2222
required: true

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ SPHINXOPTS ?=
77
PAPER ?=
88

99
# Internal variables.
10-
SPHINXBUILD = $(realpath bin/sphinx-build)
11-
SPHINXAUTOBUILD = $(realpath bin/sphinx-autobuild)
10+
SPHINXBUILD = "$(realpath bin/sphinx-build)"
11+
SPHINXAUTOBUILD = "$(realpath bin/sphinx-autobuild)"
1212
DOCS_DIR = ./docs/
1313
BUILDDIR = ../_build
1414
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -235,7 +235,7 @@ netlify:
235235
ln -s ../submodules/volto/docs/source ./docs/volto
236236
ln -s ../submodules/plone.restapi ./docs/plone.restapi
237237
ln -s ../submodules/plone.api/docs ./docs/plone.api
238-
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
238+
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html && cp ./netlify_robots.txt $(BUILDDIR)/html/robots.txt
239239

240240
.PHONY: storybook
241241
storybook:

docs/classic-ui/images.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ tag = scale_util.tag(
114114
scale=None,
115115
height=None,
116116
width=None,
117-
direction="thumbnail"
117+
mode="scale"
118118
)
119119
```
120120

@@ -233,20 +233,44 @@ image_scale = scaling_util.publishTraverse(context.REQUEST, groups[1])
233233
```
234234

235235

236-
(classic-ui-images-scaling-direction-label)=
236+
(classic-ui-images-scaling-mode-label)=
237237

238-
## Scaling `direction`
238+
## Scaling `mode`
239239

240-
The default direction is `thumbnail`.
240+
```{versionchanged} 6.0
241+
Added `mode` to replace the deprecated `direction`.
242+
Added new option names for `mode` to align with CSS `background-size` values, and deprecated previous names `keep`, `thumbnail`, `scale-crop-to-fit`, `down`, `scale-crop-to-fill`, and `up`.
243+
```
244+
245+
Scaling is intended for the optimal display of images in a web browser.
246+
247+
To scale an image, you can use the `mode` parameter to control the scaling output.
248+
You must use either `width` or `height`, or both.
249+
250+
Three different scaling options are supported.
251+
They correspond to the CSS [`background-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) values.
252+
253+
The possible options for `mode` are listed below, where the default option is `scale`.
254+
255+
`scale`
256+
: This is the default option.
257+
`scale` scales to the requested dimensions without cropping.
258+
The resulting image may have a different size than requested.
259+
This option requires both `width` and `height` to be specified.
260+
It does not scale up.
261+
262+
Deprecated option names: `keep`, `thumbnail`.
263+
264+
`contain`
265+
: `contain` starts by scaling the image either to the smaller dimension when you give both `width` and `height`, or to the only given dimension, then crops to the other dimension if needed.
266+
267+
Deprecated option names: `scale-crop-to-fit`, `down`.
241268

242-
Other options are:
269+
`cover`
270+
: `cover` scales the image either to the larger dimension when you give both `width` and `height`, or to the only given dimension, up to the size you specify.
271+
Despite the deprecated option name, it does not crop.
243272

244-
* `down`
245-
* `keep`
246-
* `scale-crop-to-fill`
247-
* `scale-crop-to-fit`
248-
* `thumbnail`
249-
* `up`
273+
Deprecated option names: `scale-crop-to-fill`, `up`.
250274

251275

252276
(classic-ui-images-permissions-label)=

docs/classic-ui/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ forms
5353
icons
5454
images
5555
layers
56+
mockup
5657
portlets
5758
recipes
5859
static-resources

docs/classic-ui/mockup.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "Mockup together with Patternslib are used to build the UI toolkit for Classic UI, a frontend for Plone."
5+
"property=og:description": "Mockup together with Patternslib are used to build the UI toolkit for Classic UI, a frontend for Plone."
6+
"property=og:title": "Mockup"
7+
"keywords": "Mockup, Patternslib, Classic UI, frontend, Plone"
8+
---
9+
10+
(mockup-label)=
11+
12+
# Mockup
13+
14+
{term}`Mockup` together with {term}`Patternslib` are used to build the UI toolkit for {term}`Classic UI`, a frontend for Plone.
15+
16+
View the [interactive documentation of Mockup](https://plone.github.io/mockup/).
17+
18+
For more information, visit the [Mockup repository on GitHub](https://github.com/plone/mockup).

docs/classic-ui/theming/barceloneta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To create an add-on package with a Plone Classic UI theme, you need to install t
2525
- [Python (>=3.8)](https://www.python.org/)
2626
- [plonecli](https://pypi.org/project/plonecli/)
2727

28-
Read more about how to install pre-requisites in {doc}`/install/install-from-packages`.
28+
Read more about how to install pre-requisites in {doc}`/install/create-project`.
2929

3030

3131
(classic-ui-theming-barceloneta-create-a-classic-ui-theme-add-on-package-label)=

docs/conf.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"sphinx.ext.todo",
5050
"sphinx_copybutton",
5151
"sphinx_design",
52+
"sphinx_reredirects",
5253
"sphinx_sitemap",
5354
"sphinxcontrib.httpdomain", # plone.restapi
5455
"sphinxcontrib.httpexample", # plone.restapi
@@ -92,11 +93,14 @@
9293
r"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors#Identifying_the_issue",
9394
r"https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0", # volto
9495
# Ignore unreliable sites
96+
r"https://chromewebstore.google.com/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi", # TODO retest with latest Sphinx when upgrading theme. chromewebstore recently changed its URL and has "too many redirects".
97+
r"https://chromewebstore.google.com/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd", # TODO retest with latest Sphinx when upgrading theme. chromewebstore recently changed its URL and has "too many redirects".
98+
r"https://stackoverflow.com", # volto and documentation # TODO retest with latest Sphinx.
9599
r"https://web.archive.org/", # volto
96100
r"https://www.youtube.com/playlist", # volto, TODO remove after installing sphinxcontrib.youtube
97101
]
98102
linkcheck_anchors = True
99-
linkcheck_timeout = 5
103+
linkcheck_timeout = 10
100104
linkcheck_retries = 1
101105

102106
# The suffix of source filenames.
@@ -127,6 +131,11 @@
127131
"plone.restapi/performance",
128132
"plone.restapi/src",
129133
"volto/contributing/branch-policy.md",
134+
"volto/contributing/install-docker.md",
135+
"volto/contributing/install-git.md",
136+
"volto/contributing/install-make.md",
137+
"volto/contributing/install-nodejs.md",
138+
"volto/contributing/install-operating-system.md",
130139
]
131140

132141
suppress_warnings = [
@@ -216,6 +225,16 @@
216225
notfound_template = "404.html"
217226

218227

228+
# -- sphinx-reredirects configuration ----------------------------------
229+
# https://documatt.com/sphinx-reredirects/usage.html
230+
redirects = {
231+
"contributing/plone-api": "/plone.api/contribute/index.html",
232+
"contributing/plone-restapi": "/plone.restapi/docs/source/contributing/index.html",
233+
"contributing/volto": "/volto/contributing/index.html",
234+
"install/install-from-packages": "/install/create-project.html",
235+
}
236+
237+
219238
# -- Options for HTML output -------------------------------------------------
220239

221240
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -322,9 +341,9 @@ def source_replace(app, docname, source):
322341
# Dict of replacements.
323342
source_replacements = {
324343
"{PLONE_BACKEND_MINOR_VERSION}": "6.0",
325-
"{PLONE_BACKEND_PATCH_VERSION}": "6.0.8",
344+
"{PLONE_BACKEND_PATCH_VERSION}": "6.0.10.1",
326345
"{NVM_VERSION}": "0.39.5",
327-
"{SUPPORTED_PYTHON_VERSIONS}": "3.8, 3.9, 3.10, or 3.11",
346+
"{SUPPORTED_PYTHON_VERSIONS}": "3.8, 3.9, 3.10, 3.11, or 3.12",
328347
}
329348

330349

docs/contributing/documentation/authors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,4 +298,5 @@ The Plone Documentation Team adopted additional guidelines.
298298
## General documentation writing references
299299

300300
- [Write the Docs - Documentation Guide](https://www.writethedocs.org/guide/)
301+
- [Creating effective technical documentation](https://developer.mozilla.org/en-US/blog/technical-writing/), Dipika Bhattacharya, Technical Writer at Mozilla Developer Network
301302
- [A Guide to Em Dashes, En Dashes, and Hyphens](https://www.merriam-webster.com/grammar/em-dash-en-dash-how-to-use)

docs/contributing/documentation/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ This document describes how to contribute to Plone Documentation.
1515

1616
Contributions to the Plone Documentation are welcome.
1717

18+
```{seealso}
19+
To set up and build the documentation locally, see {doc}`setup-build`.
20+
```
21+
1822

1923
(contributing-permission-to-publish-label)=
2024

docs/contributing/documentation/setup-build.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ myst:
1111

1212
# Building and checking the quality of documentation
1313

14-
This document covers how to build the Plone Documentation and check it for quality.
14+
This document covers how to set up and build the Plone Documentation and check it for quality.
1515

1616

1717
(setup-build-installation-label)=
@@ -20,14 +20,28 @@ This document covers how to build the Plone Documentation and check it for quali
2020

2121
Installation of Plone 6 Documentation includes pre-requisites and the repository itself.
2222

23+
```{include} ../../volto/contributing/install-operating-system.md
24+
```
25+
- {ref}`setup-build-installation-python-label` {SUPPORTED_PYTHON_VERSIONS}
26+
- {ref}`setup-build-installation-gnu-make-label`
27+
- {ref}`setup-build-installation-graphviz-label`
28+
2329

2430
(setup-build-installation-python-label)=
2531

2632
### Python
2733

28-
Python 3.8 or later is required.
29-
A more recent Python is preferred.
30-
Use your system's package manager or [pyenv](https://github.com/pyenv/pyenv) to install an appropriate version of Python.
34+
Installing Python is beyond the scope of this documentation.
35+
However, it is recommended to use a Python version manager, {term}`pyenv` that allows you to install multiple versions of Python on your development environment without destroying your system's Python.
36+
Plone requires Python version {SUPPORTED_PYTHON_VERSIONS}.
37+
38+
39+
(setup-build-installation-gnu-make-label)=
40+
41+
### GNU make
42+
43+
```{include} ../../volto/contributing/install-make.md
44+
```
3145

3246

3347
(setup-build-installation-graphviz-label)=

0 commit comments

Comments
 (0)