@eeacms/volto-datahub 2.0.2 → 2.0.4

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
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [2.0.4](https://github.com/eea/volto-datahub/compare/2.0.3...2.0.4) - 29 October 2025
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: datahub rss feeds - ref #293430 [Teodor Voicu - [`8b401ea`](https://github.com/eea/volto-datahub/commit/8b401ea6313ea4377cfbaf1a28249eea65fe8f2f)]
12
+
13
+ ### [2.0.3](https://github.com/eea/volto-datahub/compare/2.0.2...2.0.3) - 23 October 2025
14
+
15
+ #### :nail_care: Enhancements
16
+
17
+ - change: Datahub landing page change label Archived to superseded - refs #292321 [Teodor Voicu - [`6d262c2`](https://github.com/eea/volto-datahub/commit/6d262c230a9745669aef033359d2cf338e00f4ec)]
18
+
19
+ #### :house: Internal changes
20
+
21
+ - chore: package.json [Alin Voinea - [`4880243`](https://github.com/eea/volto-datahub/commit/48802434827758e654299d37408ba87f7afa2aac)]
22
+
7
23
  ### [2.0.2](https://github.com/eea/volto-datahub/compare/2.0.1...2.0.2) - 23 September 2025
8
24
 
9
25
  #### :house: Internal changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-datahub",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "@eeacms/volto-datahub: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -18,9 +18,9 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@eeacms/volto-accordion-block": "*",
21
+ "@eeacms/volto-eea-design-system": "*",
21
22
  "@eeacms/volto-globalsearch": "*",
22
23
  "@eeacms/volto-listing-block": "*",
23
- "@eeacms/volto-eea-design-system": "*",
24
24
  "feed": "4.2.2"
25
25
  },
26
26
  "devDependencies": {
@@ -201,7 +201,7 @@ const DatasetItemsList = (props) => {
201
201
  )}
202
202
 
203
203
  {archived && (
204
- <span className="dh-label inverted">Archived</span>
204
+ <span className="dh-label inverted">Superseded</span>
205
205
  )}
206
206
 
207
207
  {isInternal(dataset) && (
@@ -136,36 +136,33 @@ function ItemView(props) {
136
136
  }, [item, dispatch, docid, rawTitle, currentUrl]);
137
137
 
138
138
  const intl = useIntl();
139
- const rssLinks = [
140
- {
141
- title: 'RSS',
142
- href: `${currentUrl}/datahub_rss.xml`,
143
- },
144
- ];
139
+ const rssLink = {
140
+ title: 'RSS',
141
+ href: `${currentUrl}/datahub_rss.xml`,
142
+ };
145
143
 
146
144
  return item && item._meta.found ? (
147
145
  <div className="dataset-view">
148
- <Helmet title={title?.raw} />
146
+ <Helmet
147
+ title={title?.raw}
148
+ link={[
149
+ {
150
+ rel: 'alternate',
151
+ title: rssLink.title ?? intl.formatMessage(messages.rssFeed),
152
+ href: rssLink.href,
153
+ type:
154
+ rssLink.feedType === 'atom'
155
+ ? 'application/atom+xml'
156
+ : 'application/rss+xml',
157
+ },
158
+ ]}
159
+ />
149
160
  <IsomorphicPortal>
150
161
  <div className="dataset">
151
162
  <Banner>
152
163
  <Banner.Content
153
- actions={rssLinks?.map((rssLink, index) => (
164
+ actions={
154
165
  <>
155
- <Helmet
156
- link={[
157
- {
158
- rel: 'alternate',
159
- title:
160
- rssLink.title ?? intl.formatMessage(messages.rssFeed),
161
- href: rssLink.href,
162
- type:
163
- rssLink.feedType === 'atom'
164
- ? 'application/atom+xml'
165
- : 'application/rss+xml',
166
- },
167
- ]}
168
- />
169
166
  <Banner.Action
170
167
  icon="ri-rss-fill"
171
168
  title={
@@ -176,7 +173,7 @@ function ItemView(props) {
176
173
  target="_blank"
177
174
  />
178
175
  </>
179
- ))}
176
+ }
180
177
  >
181
178
  <Banner.Subtitle>
182
179
  <Link to={appConfig.landingPageURL}>
@@ -223,10 +223,14 @@ export default function makeMiddlewares(config) {
223
223
  middleware.use(express.urlencoded({ extended: true }));
224
224
 
225
225
  middleware.all('**/datahub/sitemap-data.xml', sitemap);
226
+ // Original landing page RSS route (restored for backwards compatibility)
227
+ middleware.all('**/datahub/rss.xml', make_rssMiddleware(config, generateRSS));
228
+ // Alternative landing page RSS route
226
229
  middleware.all(
227
230
  '**/datahub/datahub_rss.xml',
228
231
  make_rssMiddleware(config, generateRSS),
229
232
  );
233
+ // Per-item RSS route
230
234
  middleware.all(
231
235
  `**/datahub/${viewRouteId}/:id/${rssRouteId}`,
232
236
  make_rssMiddleware(config, generateItemRSS),
package/src/index.js CHANGED
@@ -41,6 +41,8 @@ const applyConfig = (config) => {
41
41
  config.settings.nonContentRoutes.push(
42
42
  new RegExp(`/.+/datahub/${rssRouteIdRegexp}`),
43
43
  );
44
+ // Original landing page RSS route
45
+ config.settings.nonContentRoutes.push(new RegExp(`/.+/datahub/rss\\.xml`));
44
46
 
45
47
  config.settings.externalRoutes.push({
46
48
  match: {
@@ -49,6 +51,14 @@ const applyConfig = (config) => {
49
51
  exact: true,
50
52
  },
51
53
  });
54
+ // Original landing page RSS route
55
+ config.settings.externalRoutes.push({
56
+ match: {
57
+ path: new RegExp(`/.+/datahub/rss\\.xml`),
58
+ strict: true,
59
+ exact: true,
60
+ },
61
+ });
52
62
  config.addonRoutes = [
53
63
  {
54
64
  path: `*/${viewRouteId}/:id`,