@plone/volto 18.8.2 → 18.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -17,6 +17,28 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 18.9.0 (2025-02-17)
21
+
22
+ ### Feature
23
+
24
+ - Add self link in alternate language links @erral [#6602](https://github.com/plone/volto/issues/6602)
25
+
26
+ ### Bugfix
27
+
28
+ - Serve `sitemap.xml.gz` as an alias for `sitemap-index.xml`. @reebalazs [#6561](https://github.com/plone/volto/issues/6561)
29
+ - Move the block chooser beneath the block, instead of covering the block and preventing making a choice, when `config.experimental.addBlockButton` is enabled. @giuliaghisini [#6751](https://github.com/plone/volto/issues/6751)
30
+
31
+ ### Internal
32
+
33
+ - Use Plone 6.1.0 final release. @sneridagh [#6731](https://github.com/plone/volto/issues/6731)
34
+ - Add Film Basque Country website to README. @erral [#6741](https://github.com/plone/volto/issues/6741)
35
+ - Sync content from Awesome Volto into README. @stevepiercy [#6745](https://github.com/plone/volto/issues/6745)
36
+ - Fixes intermittent error in cypress "Index Text Block" test. @wesleybl [#6755](https://github.com/plone/volto/issues/6755)
37
+
38
+ ### Documentation
39
+
40
+ - Document Slate heading as anchor links in Volto blocks user manual. @nileshgulia1 [#5755](https://github.com/plone/volto/issues/5755)
41
+
20
42
  ## 18.8.2 (2025-02-08)
21
43
 
22
44
  ### Bugfix
package/README.md CHANGED
@@ -142,14 +142,17 @@ To ensure your website gets the greatest exposure, add it both to [Awesome Volto
142
142
  - [Debako Udala / Ayuntamiento de Deba](https://www.deba.eus/eu) (Website of the municipality of Deba, developed by [CodeSyntax](https://www.codesyntax.com/en), 2022)
143
143
  - [European Environment Agency](https://www.eea.europa.eu/en) (Website of the European Environment Agency. Developed by [Eau de Web](https://eaudeweb.ro), 2023)
144
144
  - [Energy Climate Union portal for Europe](https://climate-energy.eea.europa.eu/) (Thematic website focusing on European strides towards mitigating climate change, developed by [Eau de Web](https://eaudeweb.ro/), 2020)
145
- - [Excellence at Humboldt-Universität zu Berlin](https://www.alles-beginnt-mit-einer-frage.de) (Website for the excellence initiative of the [Humboldt University Berlin](https://www.hu-berlin.de/de), developed by [kitconcept GmbH](https://kitconcept.com/en), 2019)
145
+ - Excellence at Humboldt-Universität zu Berlin (Website for the excellence initiative of the [Humboldt University Berlin](https://www.hu-berlin.de/de), developed by [kitconcept GmbH](https://kitconcept.com/en), 2019)
146
+ - [Film Basque Country](https://www.filmbasquecountry.eus/en) (Website to attract, guide, and support international productions, making it easier for them to film in the Basque Country, developed by [CodeSyntax](https://www.codesyntax.com/en), 2025)
146
147
  - [Forest Information System for Europe](https://forest.eea.europa.eu) (Thematic website focusing on European forests, developed by [Eau de Web](https://eaudeweb.ro/), 2019)
147
148
  - [Forschungszentrum Jülich](https://www.fz-juelich.de/de) (Website for Forschungzentrum Jülich, which is one of the largest research institutions in Europe, developed by [kitconcept GmbH](https://kitconcept.com/en), 2022)
149
+ - [Geosphere Austria](https://www.geosphere.at/de) (Website of the Austrian Federal Institute, national geological, geophysical, climatological and meteorological service, 2023)
148
150
  - [German Aerospace Center (DLR)](https://www.dlr.de/de) (The German Aerospace Center (DLR) is the Federal Republic of Germany's research center for aeronautics. With more than 10.000 employees and a yearly budget of more than 1 billion euros, it is one of the largest research institutions in Germany, developed by [kitconcept GmbH](https://kitconcept.com/en), 2023)
149
151
  - [Helmholtz-Institut Erlangen-Nürnberg für Erneuerbare Energien (HI-ERN)](https://www.hi-ern.de/de) (Website for HI ERN, a research institution for renewable energies, developed by [kitconcept GmbH](https://kitconcept.com/en), 2022)
150
152
  - [Humboldt Labor](https://www.humboldtforum.org/de/programm/dauerangebot/ausstellung/nach-der-natur-14144/) (The Humboldt Lab is a website where the Humboldt University Berlin presents its latest research projects and findings. Developed by [WLDX](https://wldx.de/) and [kitconcept GmbH](https://kitconcept.com/en), 2020)
151
153
  - [ILPO](https://ilpo.jyu.fi/) (the registration portal of continuous learning at the University of Jyväskylä. Developed by University of Jyväskylä, 2022)
152
154
  - [Industrial Emissions portal for Europe](https://industry.eea.europa.eu) (Thematic website focusing on European industrial emissions, developed by [Eau de Web](https://eaudeweb.ro/), 2020)
155
+ - [iTlent - Basque Institute of Talent in VET](https://www.itlent.eus/en) (developed by [CodeSyntax](https://www.codesyntax.com/en), 2024)
153
156
  - [Jobfamilie MEDICE](https://jobfamilie.medice.de/de) (Carrer website for MEDICE Arzneimittel Pütter GmbH & Co. KG), developed by [Werkbank GmbH](https://werkbank.de/), 2020)
154
157
  - [Lanku](https://www.lanku.eus) (Website for Lanku Kultur Zerbitzuak, a company offering cultural services and improvised Basque verse singing sessions across the Basque Country, developed by [CodeSyntax](https://www.codesyntax.com/en), 2023)
155
158
  - [Leibniz Institute for Science and Mathematics Education (IPN)](https://www.leibniz-ipn.de/de) (Website of the IPN, a research institute dedicated to issues related to learning and teaching of science, mathematics and computer science in and outside of schools, developed by [Starzel](https://www.starzel.de), 2023)
@@ -179,7 +182,7 @@ You should check the dependencies in their `package.json` for more details.
179
182
  - [Freshwater Information System for Europe](https://github.com/eea/freshwater-frontend) - Volto project for [Freshwater Information System for Europe website](https://water.europa.eu/freshwater)
180
183
  - [European Industrial Emissions Portal](https://github.com/eea/industry-frontend ) - Volto project for [European Industrial Emissions Portal website](https://industry.eea.europa.eu)
181
184
  - [Biodiversity Information System for Europe](https://github.com/eea/bise-frontend) - Volto project for [Biodiversity Information System for Europe website](https://biodiversity.europa.eu)
182
- - [EEA Main Website frontend](https://github.com/eea/eea-website-frontend) - Volto project for [European Environment Agency](https://www.eea.europa.eu/en)
185
+ - [EEA Main Website frontend](https://github.com/eea/eea-website-frontend) - Plone 6 Volto frontend for [European Environment Agency](https://www.eea.europa.eu/en)
183
186
  - [Climate and energy in the EU](https://github.com/eea/climate-energy-frontend) - Volto project for [Climate and energy in the EU website](https://climate-energy.eea.europa.eu)
184
187
  - [volto-bise](https://github.com/eea/volto-bise) - A Volto project packaged as an addon. It provides Theming using a razzle.extend.js provided alias.
185
188
  - [design-volto-theme](https://github.com/RedTurtle/design-volto-theme) Volto theme for Italian Public Administration
@@ -190,7 +193,6 @@ You should check the dependencies in their `package.json` for more details.
190
193
  - [nsw-design-system-plone6-kit](https://github.com/pretagov/nsw-design-system-plone6-kit) - NSW Design System Plone 6 Kit Volto project for [NSW.gov.au sites](https://digitalnsw.pretagov.com.au/)
191
194
  - [volto-centraalmuseum-theme](https://github.com/intk/volto-centraalmuseum-theme) - Volto project for the [Centraal Museum & Rietveld](https://www.centraalmuseum.nl/nl) made for [INTK](https://www.intk.com/en).
192
195
  - [volto-eea-design-system](https://github.com/eea/volto-eea-design-system) - EEA Design System Plone 6 Kit Volto project for [European Environment Agency web sites](https://eea.github.io/volto-eea-design-system/)
193
- - [volto-eea-website-theme](https://github.com/eea/volto-eea-website-theme) - EEA Plone 6 Volto Theme for [European Environment Agency web sites](https://www.eea.europa.eu/en)
194
196
  - [volto-eea-kitkat](https://github.com/eea/volto-eea-kitkat) - A known good set of Volto add-ons to be used within all EEA projects and beyond, made for [European Environment Agency](https://www.eea.europa.eu/en)
195
197
  - [volto-rietveldschroderhuis-theme](https://github.com/intk/volto-rietveldschroderhuis-theme) - Volto project for the [Rietveld Schröder House](https://www.rietveldschroderhuis.nl/en) made for [INTK](https://www.intk.com/en).
196
198
  - [volto-zeeuwsmuseum-theme](https://github.com/intk/volto-zeeuwsmuseum-theme) - Volto project for the [Zeeuws Museum](https://www.zeeuwsmuseum.nl/en) made for [INTK](https://www.intk.com/en).
@@ -730,10 +730,13 @@ Cypress.Commands.add('getSlate', (createNewSlate = false) => {
730
730
  cy.getIfExists(
731
731
  SLATE_SELECTOR,
732
732
  () => {
733
- slate = cy.get(SLATE_SELECTOR).last();
733
+ slate = cy.get(SLATE_SELECTOR).last().should('be.visible');
734
734
  },
735
735
  () => {
736
- slate = cy.get(SLATE_SELECTOR, { timeout: 10000 }).last();
736
+ slate = cy
737
+ .get(SLATE_SELECTOR, { timeout: 10000 })
738
+ .last()
739
+ .should('be.visible');
737
740
  },
738
741
  );
739
742
  return slate;
@@ -2,7 +2,7 @@ version: '3.3'
2
2
  services:
3
3
 
4
4
  backend:
5
- image: plone/plone-backend:6.1.0rc1
5
+ image: plone/plone-backend:6.1.0
6
6
  # Plone 5.2 series can be used too
7
7
  # image: plone/plone-backend:5.2.10
8
8
  ports:
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "18.8.2",
12
+ "version": "18.9.0",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -98,7 +98,9 @@ const BlockChooserButton = (props) => {
98
98
  {
99
99
  name: 'flip',
100
100
  options: {
101
- fallbackPlacements: ['right-end', 'top-start'],
101
+ fallbackPlacements: config.experimental.addBlockButton.enabled
102
+ ? ['bottom-start', 'bottom-end']
103
+ : ['right-end', 'top-start'],
102
104
  },
103
105
  },
104
106
  ],
@@ -6,7 +6,11 @@ const AlternateHrefLangs = (props) => {
6
6
  return (
7
7
  <Helmet>
8
8
  {config.settings.isMultilingual &&
9
- content['@components']?.translations?.items?.map((item, key) => {
9
+ content['@components']?.translations?.items &&
10
+ [
11
+ ...content['@components']?.translations?.items,
12
+ { '@id': content['@id'], language: content.language.token },
13
+ ].map((item, key) => {
10
14
  return (
11
15
  <link
12
16
  key={key}
@@ -40,12 +40,11 @@ describe('AlternateHrefLangs', () => {
40
40
  config.settings.supportedLanguages = ['en', 'es', 'eu'];
41
41
 
42
42
  const content = {
43
+ '@id': '/en',
44
+ language: { token: 'en', title: 'English' },
43
45
  '@components': {
44
46
  translations: {
45
- items: [
46
- { '@id': '/en', language: 'en' },
47
- { '@id': '/es', language: 'es' },
48
- ],
47
+ items: [{ '@id': '/es', language: 'es' }],
49
48
  },
50
49
  },
51
50
  };
@@ -81,6 +80,7 @@ describe('AlternateHrefLangs', () => {
81
80
  hrefLang: 'en',
82
81
  });
83
82
  });
83
+
84
84
  it('multilingual site, with all available translations', () => {
85
85
  config.settings.isMultilingual = true;
86
86
  config.settings.supportedLanguages = ['en', 'es', 'eu'];
@@ -92,10 +92,11 @@ describe('AlternateHrefLangs', () => {
92
92
  });
93
93
 
94
94
  const content = {
95
+ '@id': '/en',
96
+ language: { token: 'en', title: 'English' },
95
97
  '@components': {
96
98
  translations: {
97
99
  items: [
98
- { '@id': '/en', language: 'en' },
99
100
  { '@id': '/eu', language: 'eu' },
100
101
  { '@id': '/es', language: 'es' },
101
102
  ],
@@ -47,11 +47,24 @@ export const sitemapIndex = function (req, res, next) {
47
47
  });
48
48
  };
49
49
 
50
+ export const sitemapIndexCompatibility = function (req, res, next) {
51
+ generateSitemapIndex(req, true).then((sitemapIndex) => {
52
+ res.set('Content-Type', 'application/x-gzip');
53
+ res.set('Content-Disposition', 'attachment; filename="sitemap.xml.gz"');
54
+ res.send(sitemapIndex);
55
+ });
56
+ };
57
+
50
58
  export default function sitemapMiddleware() {
51
59
  const middleware = express.Router();
52
60
 
53
- middleware.all('**/sitemap.xml.gz', sitemap);
61
+ // For backwards compatibility, and allow a graceful transition for
62
+ // sites that are already set up on the Google Search Console, we continue delivering
63
+ // the new batched sitemap under the old sitemap.xml.gz name.
64
+ middleware.all('**/sitemap.xml.gz', sitemapIndexCompatibility);
54
65
  middleware.all('**/sitemap:batch.xml.gz', sitemap);
66
+ // For new setups, `sitemap-index.xml` should be added to the
67
+ // Google Search Console.
55
68
  middleware.all('**/sitemap-index.xml', sitemapIndex);
56
69
  middleware.id = 'sitemap.xml.gz';
57
70
  return middleware;
@@ -61,7 +61,7 @@ export const generateSitemap = (_req, start = 0, size = undefined) =>
61
61
  * @param {Object} _req Request object
62
62
  * @return {string} Generated sitemap index
63
63
  */
64
- export const generateSitemapIndex = (_req) =>
64
+ export const generateSitemapIndex = (_req, gzip = false) =>
65
65
  new Promise((resolve) => {
66
66
  const { settings } = config;
67
67
  const APISUFIX = settings.legacyTraverse ? '' : '/++api++';
@@ -88,7 +88,14 @@ export const generateSitemapIndex = (_req) =>
88
88
  const result = `<?xml version="1.0" encoding="UTF-8"?>
89
89
  <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
90
90
  ${items.join('\n')}\n</sitemapindex>`;
91
- resolve(result);
91
+
92
+ if (gzip) {
93
+ zlib.gzip(Buffer.from(result, 'utf8'), (_err, buffer) => {
94
+ resolve(buffer);
95
+ });
96
+ } else {
97
+ resolve(result);
98
+ }
92
99
  }
93
100
  });
94
101
  });
@@ -1,3 +1,4 @@
1
1
  export default function sitemapMiddleware(): any;
2
2
  export function sitemap(req: any, res: any, next: any): void;
3
3
  export function sitemapIndex(req: any, res: any, next: any): void;
4
+ export function sitemapIndexCompatibility(req: any, res: any, next: any): void;
@@ -1,3 +1,3 @@
1
1
  export const SITEMAP_BATCH_SIZE: 5000;
2
2
  export function generateSitemap(_req: any, start?: number, size?: any): string;
3
- export function generateSitemapIndex(_req: any): string;
3
+ export function generateSitemapIndex(_req: any, gzip?: boolean): string;