Skip to content

Commit 2cc3305

Browse files
authored
Merge branch '6-dev' into plone.app.dexterity-init
2 parents e4a1f5a + 406189e commit 2cc3305

File tree

8 files changed

+130
-31
lines changed

8 files changed

+130
-31
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def source_replace(app, docname, source):
322322
# Dict of replacements.
323323
source_replacements = {
324324
"{PLONE_BACKEND_MINOR_VERSION}": "6.0",
325-
"{PLONE_BACKEND_PATCH_VERSION}": "6.0.1",
325+
"{PLONE_BACKEND_PATCH_VERSION}": "6.0.2",
326326
"{NVM_VERSION}": "0.39.3",
327327
}
328328

docs/contributing/authors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ This renders in the HTML `<head>` section as follows.
228228
<meta content="Plone, Documentation, SEO, meta, Vale, spell, grammar, style, check, linkcheck, lexer" name="keywords" />
229229
```
230230

231-
Additional {term}`Open Graph` metadata is implemented through the Sphinx extension [`sphinxext-opengraph`](https://github.com/wpilibsuite/sphinxext-opengraph) and the [MyST `html_meta` directive](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#setting-html-metadata), which resolves to the [Docutils `meta` directive](https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata).
231+
Additional {term}`Open Graph` metadata is implemented through the Sphinx extension [`sphinxext-opengraph`](https://github.com/wpilibsuite/sphinxext-opengraph) and the [MyST `html_meta` directive](https://myst-parser.readthedocs.io/en/latest/configuration.html#setting-html-metadata), which resolves to the [Docutils `meta` directive](https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata).
232232
See the site-wide configuration in {file}`conf.py`.
233233

234234

docs/contributing/myst-reference.md

Lines changed: 116 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ Official MyST documentation
3939
```
4040

4141

42-
### Targets and cross-referencing
42+
### Cross-references
4343

4444
```{seealso}
45-
[The MyST Syntax Guide > Targets and Cross-Referencing](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#targets-and-cross-referencing)
45+
[The MyST Syntax Guide > Cross-references](https://myst-parser.readthedocs.io/en/latest/syntax/cross-referencing.html)
4646
```
4747

4848
#### Link to a chapter or page
@@ -99,30 +99,69 @@ Use [Shimmer](http://example.com) for cleaner whiter teeth.
9999
Use [Shimmer](http://example.com) for cleaner whiter teeth.
100100

101101

102-
#### Images and figures
102+
### Images and figures
103103

104104
[Figures](https://docutils.sourceforge.io/docs/ref/rst/directives.html#figure) allow a caption and legend, whereas [images](https://docutils.sourceforge.io/docs/ref/rst/directives.html#images) do not.
105+
However we can {ref}`enhance images with cards <enhance-images-label>` to add a caption and more features.
105106

106107
Use `image` for anything but diagrams.
107108

108109
Use `figure` for diagrams.
109110

110-
Paths to images and figures must resolve in both the main documentation and the submodule's documentation, if present.
111111

112-
For inline images, we use the MyST extension [`html_image`](https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#html-images).
113-
Example syntax is shown below.
112+
(static-assets-label)=
114113

115-
```html
116-
You can copy <img alt="Copy icon" src="../../_images/copy.svg" class="inline"> blocks.
117-
```
114+
#### Static assets
118115

119-
Note that the HTML attribute `class` must be set to `inline` to render the image inline at `1rem`.
116+
When the documentation is in a submodule, paths to static assets—including, images, figures, and videos—must resolve in both the main documentation and the submodule's documentation.
120117

121-
The above syntax renders as shown below.
118+
Inside the `docs` directory, place static assets in the `/_static/` directory, and preferably inside a subdirectory named after the part or page of the documentation.
119+
For example, in the `volto` submodule, inside its `src/docs` directory, place an image at `/_static/user-manual/block-left-add-icon.png`.
120+
In your markup, use that same `docs`-root-relative path for the target, such as `/_static/user-manual/block-left-add-icon.png`.
121+
Don't use file-relative paths.
122122

123-
> You can copy <img alt="Copy icon" src="/_static/copy.svg" class="inline"> blocks.
123+
Configuration in the `conf.py` files for the main documentation and its submodules handle the resolution of `docs`-root-relative paths for you.
124124

125-
Images and figures should always include `alt` text.
125+
126+
#### Width of media
127+
128+
The main content area of a page in the documentation is 743 pixels wide.
129+
When taking screenshots or videos, resize your browser window, or try to limit the width of your media to 740 pixels.
130+
This will preserve legibility of images.
131+
132+
133+
(enhance-images-label)=
134+
135+
#### Enhance images
136+
137+
We use cards from the Sphinx extension [`sphinx-design`](https://sphinx-design.readthedocs.io/en/latest/cards.html) to enhance the display and functionality of images.
138+
139+
Cards allow the display of a caption, create a link to the source image to display when it is too large to fit within the documentation page without scaling, and add a border to demarcate the image from the page's white background.
140+
141+
The following MyST example will display as shown below.
142+
143+
`````md
144+
````{card}
145+
```{image} /_static/caching/caching-disabled.png
146+
:alt: Caching Control Panel
147+
:target: /_static/caching/caching-disabled.png
148+
```
149+
+++
150+
_Caching Control Panel_
151+
````
152+
`````
153+
154+
````{card}
155+
```{image} /_static/caching/caching-disabled.png
156+
:alt: Caching Control Panel
157+
:target: /_static/caching/caching-disabled.png
158+
```
159+
+++
160+
_Caching Control Panel_
161+
````
162+
163+
164+
#### Accessibility with `alt` text
126165

127166
From [Web Accessibility In Mind (WebAIM)](https://webaim.org/techniques/alttext/):
128167

@@ -133,6 +172,8 @@ From [Web Accessibility In Mind (WebAIM)](https://webaim.org/techniques/alttext/
133172
134173
Accessibility is part of the [Plone brand and identity](https://plone.org/accessibility).
135174

175+
The following MyST example will display as shown below.
176+
136177
````md
137178
```{image} /_static/standards.png
138179
:alt: XKCD "Standards" comic strip
@@ -143,6 +184,26 @@ Accessibility is part of the [Plone brand and identity](https://plone.org/access
143184
:alt: XKCD "Standards" comic strip
144185
```
145186

187+
188+
#### Inline images
189+
190+
For inline images, we use the MyST extension [`html_image`](https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#html-images).
191+
Example syntax is shown below.
192+
193+
```html
194+
You can copy <img alt="Copy icon" src="../../_images/copy.svg" class="inline"> blocks.
195+
```
196+
197+
Note that the HTML attribute `class` must be set to `inline` to render the image inline at `1rem`.
198+
199+
The above syntax renders as shown below.
200+
201+
> You can copy <img alt="Copy icon" src="/_static/copy.svg" class="inline"> blocks.
202+
203+
Images and figures should always include `alt` text.
204+
205+
The following MyST example will display as shown below.
206+
146207
````md
147208
```{eval-rst}
148209
.. figure:: /_static/voting_flowchart.png
@@ -182,7 +243,7 @@ Accessibility is part of the [Plone brand and identity](https://plone.org/access
182243
```
183244

184245

185-
#### Video
246+
### Video
186247

187248
To embed local videos, such as recordings of demonstrating the user interface, we require that the videos be saved as `.mp4` for greatest compatibility, usability, accessibility, and reduced file size.
188249

@@ -194,24 +255,59 @@ If you include audio, it is helpful to include closed captions or a transcript.
194255
It is helpful to include overlays of key strokes, and mouse and other input gestures, to describe how to interact with the user interface.
195256

196257
Paths to videos must resolve in both the main documentation and the submodule's documentation, if present.
258+
See {ref}`static-assets-label` for details.
197259

198-
Example syntax is shown below.
260+
Example MyST syntax is shown below.
199261

200-
````
262+
````md
201263
```{video} /_static/user-manual/blocks/block-copy-cut.mp4
202264
:width: 100%
203265
```
204266
````
205267

206268
Note that the path must be absolute to support both submodules and the main documentation.
269+
Don't use file-relative paths.
207270
The above MyST markup renders as shown below.
208271

209272
```{video} /_static/user-manual/blocks/block-copy-cut.mp4
210273
:width: 100%
211274
```
212275

213276

214-
#### Code block
277+
### Diagrams and graphs with Graphviz
278+
279+
We use [Graphviz](https://graphviz.org/download/) and its Sphinx extension [`sphinx.ext.graphviz`](https://www.sphinx-doc.org/en/master/usage/extensions/graphviz.html) to render diagrams and graph visualizations.
280+
281+
The following MyST example will display as shown below.
282+
283+
````markdown
284+
```{eval-rst}
285+
.. graphviz::
286+
:align: center
287+
288+
digraph viewstructure {
289+
{
290+
node [margin=5,shape=box]
291+
}
292+
ZCML -> {Python, Template};
293+
}
294+
```
295+
````
296+
297+
```{eval-rst}
298+
.. graphviz::
299+
:align: center
300+
301+
digraph viewstructure {
302+
{
303+
node [margin=5,shape=box]
304+
}
305+
ZCML -> {Python, Template};
306+
}
307+
```
308+
309+
310+
### Code block
215311

216312
A Python code snippet without reStructuredText options, using a simple fence.
217313

@@ -251,7 +347,7 @@ print("my 1st line")
251347
print(f"my {a}nd line")
252348
```
253349

254-
#### Escape literal backticks inline
350+
### Escape literal backticks inline
255351

256352
```md
257353
This is MyST syntax for term ``{term}`React` ``
@@ -260,7 +356,7 @@ This is MyST syntax for term ``{term}`React` ``
260356
This is MyST syntax for term ``{term}`React` ``
261357

262358

263-
#### Glossary terms
359+
### Glossary terms
264360

265361
Add a term to the {ref}`glossary-label`, located at {file}`/glossary.md`.
266362

@@ -281,7 +377,7 @@ Using {term}`React` makes frontends fun again!
281377

282378
### Nesting directives
283379

284-
You can [nest directives](https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives), such as [admonitions](https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#admonitions) and code blocks, by ensuring that the backtick-lines corresponding to the outermost directive are longer than the backtick-lines for the inner directives.
380+
You can [nest directives](https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives), such as [admonitions](https://myst-parser.readthedocs.io/en/latest/syntax/admonitions.html) and code blocks, by ensuring that the backtick-lines corresponding to the outermost directive are longer than the backtick-lines for the inner directives.
285381

286382
`````
287383
````{tip}

docs/contributing/sphinx-extensions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ myst:
1313

1414
We use several Sphinx extensions to enhance the presentation of Plone documentation.
1515

16+
- [`sphinx.ext.graphviz`](https://www.sphinx-doc.org/en/master/usage/extensions/graphviz.html) allows you to embed [Graphviz](https://graphviz.org/download/) graphs in your documents.
1617
- [`sphinx.ext.intersphinx`](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html) provides linking between separate projects that use Sphinx for documentation.
1718
- [`sphinx.ext.todo`](https://www.sphinx-doc.org/en/master/usage/extensions/todo.html) adds support for todo items.
1819
- [`sphinx_copybutton`](https://sphinx-copybutton.readthedocs.io/en/latest/index.html) adds a little "copy" button to the right of code blocks.

docs/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ mrs-developer
272272
As a byproduct of its update operations, it also automatically adjusts `jsconfig.json`, which is used by Volto to configure webpack aliases.
273273
274274
Yarn
275-
[Yarn](https://classic.yarnpkg.com/) is a JavaScript package manager.
275+
[Yarn](https://yarnpkg.com/) is a JavaScript package manager.
276276
277277
Hydration
278278
After loading an HTML page generated with {term}`SSR` in the browser, React can populate the existing {term}`DOM` elements, and recreate and attach their coresponding components.

docs/install/install-from-packages.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,24 @@ npm install -g yo
145145

146146
(install-prerequisites-yarn-label)=
147147

148-
#### Yarn
148+
#### Yarn 3
149149

150-
Install the Yarn Classic version (not the latest 2.x one) using `npm`.
150+
Install the latest Yarn 3 version (not the Classic 1.x one) using `npm`.
151151

152152
1. Open a terminal and type:
153153

154154
```shell
155-
npm install yarn@1
155+
npm install yarn@3
156156
```
157157

158-
2. Verify that Yarn v1.x.x is installed and activated.
158+
2. Verify that Yarn v3.x.x is installed and activated.
159159

160160
```shell
161161
yarn -v
162162
```
163+
```console
164+
3.2.3
165+
```
163166

164167

165168
(install-prerequisites-make-label)=
@@ -344,8 +347,6 @@ make start-frontend
344347
The Plone frontend server starts up and emits messages to the console.
345348

346349
```console
347-
yarn run v1.22.19
348-
$ razzle start
349350
WAIT Compiling...
350351

351352

@@ -356,6 +357,7 @@ $ razzle start
356357
Compiled successfully in 9.62s
357358

358359
✅ Server-side HMR Enabled!
360+
sswp> Handling Hot Module Reloading
359361
Volto is running in SEAMLESS mode
360362
Using internal proxy: http://localhost:3000 -> http://localhost:8080/Plone
361363
🎭 Volto started at 0.0.0.0:3000 🚀

submodules/volto

Submodule volto updated 105 files

0 commit comments

Comments
 (0)