@eeacms/volto-eea-website-theme 3.10.1 → 3.11.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
|
@@ -4,11 +4,19 @@ 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
|
-
### [3.
|
|
7
|
+
### [3.11.0](https://github.com/eea/volto-eea-website-theme/compare/3.10.1...3.11.0) - 29 September 2025
|
|
8
8
|
|
|
9
|
-
#### :
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix(site): check if parent title isn't the same as navigation root title [David Ichim - [`fdb8705`](https://github.com/eea/volto-eea-website-theme/commit/fdb8705ea9de83369e7be4b95fa72ede265bd85c)]
|
|
12
|
+
- fix(ContentMetadataTags): enhance title processing logic to avoid redundant titles [David Ichim - [`b0c00ea`](https://github.com/eea/volto-eea-website-theme/commit/b0c00eaeef6e6f4c55477fea797832cba58d73af)]
|
|
13
|
+
- fix(ContentMetadataTags): refine title generation logic to exclude redundant parent title [David Ichim - [`cc5445c`](https://github.com/eea/volto-eea-website-theme/commit/cc5445c7c30e4b8ae593c230a64f8c219c5f3e1d)]
|
|
14
|
+
- fix(ContentMetadataTags): improve title filtering logic to ensure valid parts are included [David Ichim - [`cc79da8`](https://github.com/eea/volto-eea-website-theme/commit/cc79da80770c6f4b13a9aef4cd7ea6b0f12cce2f)]
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
#### :hammer_and_wrench: Others
|
|
17
|
+
|
|
18
|
+
- Bump version from 3.10.1 to 3.11.0 [David Ichim - [`f9d2c12`](https://github.com/eea/volto-eea-website-theme/commit/f9d2c122945efcbbc708af30e682857c176a8f78)]
|
|
19
|
+
### [3.10.1](https://github.com/eea/volto-eea-website-theme/compare/3.10.0...3.10.1) - 26 September 2025
|
|
12
20
|
|
|
13
21
|
#### :hammer_and_wrench: Others
|
|
14
22
|
|
|
@@ -89,8 +97,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
89
97
|
|
|
90
98
|
#### :hammer_and_wrench: Others
|
|
91
99
|
|
|
92
|
-
- Add Sonarqube tag using fise-frontend addons list [EEA Jenkins - [`3d50874`](https://github.com/eea/volto-eea-website-theme/commit/3d50874281ebcb91a1ae3727248f656a6f26c603)]
|
|
93
|
-
- Add Sonarqube tag using ied-frontend addons list [EEA Jenkins - [`a3f7676`](https://github.com/eea/volto-eea-website-theme/commit/a3f76767d99cb6dd93cc7fa0eafdea57e9000b2c)]
|
|
94
100
|
### [3.5.4](https://github.com/eea/volto-eea-website-theme/compare/3.5.3...3.5.4) - 30 January 2025
|
|
95
101
|
|
|
96
102
|
#### :bug: Bug Fixes
|
|
@@ -191,7 +197,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
191
197
|
|
|
192
198
|
#### :hammer_and_wrench: Others
|
|
193
199
|
|
|
194
|
-
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`e417f83`](https://github.com/eea/volto-eea-website-theme/commit/e417f839312045c56b67ab8134fe5b0622b3e2c3)]
|
|
195
200
|
## [3.0.0](https://github.com/eea/volto-eea-website-theme/compare/2.4.0...3.0.0) - 21 October 2024
|
|
196
201
|
|
|
197
202
|
#### :nail_care: Enhancements
|
|
@@ -277,7 +282,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
277
282
|
- Refs #269520 - other_organisation test [Tripon Eugen - [`7558b27`](https://github.com/eea/volto-eea-website-theme/commit/7558b27a9d1cd6d3480a32b296c7325c796006c9)]
|
|
278
283
|
- Refs #269520 - other_organisation token widget edit mode [Tripon Eugen - [`b6df127`](https://github.com/eea/volto-eea-website-theme/commit/b6df127bd91b6f55dda8f468e1107037d43752ff)]
|
|
279
284
|
- Refs #269520 - other_organisation token widget [Tripon Eugen - [`6fd7543`](https://github.com/eea/volto-eea-website-theme/commit/6fd7543894bd2c593a1729116befd95c82ea3c8f)]
|
|
280
|
-
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`cbc36c7`](https://github.com/eea/volto-eea-website-theme/commit/cbc36c74dfcd5f7cb1013a4c673d9c02e0023766)]
|
|
281
285
|
### [2.1.1](https://github.com/eea/volto-eea-website-theme/compare/2.1.0...2.1.1) - 28 May 2024
|
|
282
286
|
|
|
283
287
|
#### :bug: Bug Fixes
|
|
@@ -362,7 +366,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
362
366
|
|
|
363
367
|
#### :hammer_and_wrench: Others
|
|
364
368
|
|
|
365
|
-
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`adc6730`](https://github.com/eea/volto-eea-website-theme/commit/adc6730e21a37afb865b842182624401de6a29f5)]
|
|
366
369
|
### [1.33.1](https://github.com/eea/volto-eea-website-theme/compare/1.33.0...1.33.1) - 4 April 2024
|
|
367
370
|
|
|
368
371
|
#### :bug: Bug Fixes
|
|
@@ -496,8 +499,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
496
499
|
|
|
497
500
|
- bump version [Razvan - [`721e939`](https://github.com/eea/volto-eea-website-theme/commit/721e939d12e324b459ebfa78a2e656ee7142a3d6)]
|
|
498
501
|
- merge master into this branch [Razvan - [`586c8f9`](https://github.com/eea/volto-eea-website-theme/commit/586c8f910bac55a043bd8dda60e9444bd2ae1663)]
|
|
499
|
-
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`fd90044`](https://github.com/eea/volto-eea-website-theme/commit/fd9004442a9d1d465f7601ecdefe3e23c61e6a9c)]
|
|
500
|
-
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`4bc3dd3`](https://github.com/eea/volto-eea-website-theme/commit/4bc3dd3ae412a66befd04b5b80fab3716c929240)]
|
|
501
502
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c4dbd28`](https://github.com/eea/volto-eea-website-theme/commit/c4dbd289358205bc2d849aab7edb11ccf3b89cee)]
|
|
502
503
|
- fix tests [Razvan - [`042330b`](https://github.com/eea/volto-eea-website-theme/commit/042330bc97d32ffe7ba769b4f2453f71cffed706)]
|
|
503
504
|
- remove RemoveSchema logic [Razvan - [`08d10f8`](https://github.com/eea/volto-eea-website-theme/commit/08d10f8bf6f75478260e4e4c66d7316ba87b907a)]
|
|
@@ -592,11 +593,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
592
593
|
- test: Add real image to cypress test [Alin Voinea - [`4ff591a`](https://github.com/eea/volto-eea-website-theme/commit/4ff591ae3318c9588b4e2114582c0fa6cfdf31ae)]
|
|
593
594
|
- test: Add cypress tests for Image block styling position and align [Alin Voinea - [`7341ef7`](https://github.com/eea/volto-eea-website-theme/commit/7341ef7b92714fc0cc3ab0c31c39033e7b3e19e7)]
|
|
594
595
|
- Revert "change(tests): commented out rss test since title block config is missing" [Alin Voinea - [`fb61191`](https://github.com/eea/volto-eea-website-theme/commit/fb611918d6ca380b89b594f283dcf9f685a4b294)]
|
|
595
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`6a3be30`](https://github.com/eea/volto-eea-website-theme/commit/6a3be3092589411af7808a235f76de5222fd3868)]
|
|
596
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`c3978f2`](https://github.com/eea/volto-eea-website-theme/commit/c3978f23375ef066e9fd6f6c2e34ba6c1c058f69)]
|
|
597
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`f672779`](https://github.com/eea/volto-eea-website-theme/commit/f672779e845bec9240ccc901e9f53ec80c5a1819)]
|
|
598
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`ae5d8e3`](https://github.com/eea/volto-eea-website-theme/commit/ae5d8e3f4e04dc2808d47ce2ee886e1b23b528da)]
|
|
599
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`170ff0c`](https://github.com/eea/volto-eea-website-theme/commit/170ff0c8e3b30e69479bdf1117e811fea94f1027)]
|
|
600
596
|
### [1.23.0](https://github.com/eea/volto-eea-website-theme/compare/1.22.1...1.23.0) - 2 November 2023
|
|
601
597
|
|
|
602
598
|
#### :rocket: New Features
|
|
@@ -609,7 +605,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
609
605
|
|
|
610
606
|
#### :house: Internal changes
|
|
611
607
|
|
|
612
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`f28fce3`](https://github.com/eea/volto-eea-website-theme/commit/f28fce3d1eb815f95fb9aa40de42b10b7e8e30c5)]
|
|
613
608
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`6d15088`](https://github.com/eea/volto-eea-website-theme/commit/6d150886c5aeb2ca0b569270486e60f7cc274e2c)]
|
|
614
609
|
- chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`20c0323`](https://github.com/eea/volto-eea-website-theme/commit/20c032380b33c0077c869a05136f93e2fb68e5d4)]
|
|
615
610
|
|
|
@@ -795,7 +790,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
795
790
|
|
|
796
791
|
#### :house: Internal changes
|
|
797
792
|
|
|
798
|
-
- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`370dcbf`](https://github.com/eea/volto-eea-website-theme/commit/370dcbfbf1a8135ce7b1b3b271b004552a631837)]
|
|
799
793
|
|
|
800
794
|
#### :hammer_and_wrench: Others
|
|
801
795
|
|
|
@@ -951,7 +945,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
951
945
|
|
|
952
946
|
#### :hammer_and_wrench: Others
|
|
953
947
|
|
|
954
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c5e2f8`](https://github.com/eea/volto-eea-website-theme/commit/6c5e2f80456e2061d9e9c15fd0a0b91b9ac70568)]
|
|
955
948
|
### [1.9.1](https://github.com/eea/volto-eea-website-theme/compare/1.9.0...1.9.1) - 28 February 2023
|
|
956
949
|
|
|
957
950
|
#### :bug: Bug Fixes
|
|
@@ -1098,7 +1091,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1098
1091
|
|
|
1099
1092
|
- For some reasons types is a string [Alin Voinea - [`3769a09`](https://github.com/eea/volto-eea-website-theme/commit/3769a0981181d5b633f3498daebbe96be8b4b833)]
|
|
1100
1093
|
- Fix(redirect): o.filter - refs #157627 [Alin Voinea - [`deb23da`](https://github.com/eea/volto-eea-website-theme/commit/deb23da846444cc96539697fd798429ae0abe89e)]
|
|
1101
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f1fffc5`](https://github.com/eea/volto-eea-website-theme/commit/f1fffc5db96725440863d545580b4e76cce4b796)]
|
|
1102
1094
|
### [1.5.0](https://github.com/eea/volto-eea-website-theme/compare/1.4.2...1.5.0) - 9 January 2023
|
|
1103
1095
|
|
|
1104
1096
|
#### :hammer_and_wrench: Others
|
|
@@ -1132,7 +1124,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1132
1124
|
|
|
1133
1125
|
- Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
|
|
1134
1126
|
- bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
|
|
1135
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9b7cfef`](https://github.com/eea/volto-eea-website-theme/commit/9b7cfefb4d34fc1c948015e491feb370f9795bd8)]
|
|
1136
1127
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
|
|
1137
1128
|
### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
|
|
1138
1129
|
|
|
@@ -1142,7 +1133,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1142
1133
|
|
|
1143
1134
|
#### :hammer_and_wrench: Others
|
|
1144
1135
|
|
|
1145
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`a43c658`](https://github.com/eea/volto-eea-website-theme/commit/a43c658a7920c8df95e763b9a637f38ce77eba2c)]
|
|
1146
1136
|
- Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
|
|
1147
1137
|
- Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
|
|
1148
1138
|
### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
|
|
@@ -1153,7 +1143,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1153
1143
|
|
|
1154
1144
|
#### :hammer_and_wrench: Others
|
|
1155
1145
|
|
|
1156
|
-
- yarn 3 [Alin Voinea - [`ea7a709`](https://github.com/eea/volto-eea-website-theme/commit/ea7a7094945312776e9b6f44e371178603e92139)]
|
|
1157
1146
|
### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
|
|
1158
1147
|
|
|
1159
1148
|
#### :rocket: New Features
|
|
@@ -1194,7 +1183,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1194
1183
|
- Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
|
|
1195
1184
|
- Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
|
|
1196
1185
|
- fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
|
|
1197
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
|
|
1198
1186
|
### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022
|
|
1199
1187
|
|
|
1200
1188
|
#### :nail_care: Enhancements
|
|
@@ -1242,7 +1230,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1242
1230
|
|
|
1243
1231
|
#### :hammer_and_wrench: Others
|
|
1244
1232
|
|
|
1245
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
|
|
1246
1233
|
### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022
|
|
1247
1234
|
|
|
1248
1235
|
#### :hammer_and_wrench: Others
|
|
@@ -1510,7 +1497,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1510
1497
|
- Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
|
|
1511
1498
|
- Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
|
|
1512
1499
|
- feature(breadcrumbs): implement eea-design-system breadcrumb as Volto component #32 #7 [ichim-david - [`181af41`](https://github.com/eea/volto-eea-website-theme/commit/181af4125ce2b9ddac56dab4723cb11c26633221)]
|
|
1513
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
|
|
1514
1500
|
- use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
|
|
1515
1501
|
- Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
|
|
1516
1502
|
- Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
|
|
@@ -1552,5 +1538,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1552
1538
|
|
|
1553
1539
|
#### :hammer_and_wrench: Others
|
|
1554
1540
|
|
|
1555
|
-
- yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
|
|
1556
1541
|
- Initial commit [Alin Voinea - [`6a9c03a`](https://github.com/eea/volto-eea-website-theme/commit/6a9c03a7cebe71ca87e82cf58c42904063e9d8d3)]
|
package/package.json
CHANGED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
toPublicURL,
|
|
4
|
+
Helmet,
|
|
5
|
+
hasApiExpander,
|
|
6
|
+
getBaseUrl,
|
|
7
|
+
} from '@plone/volto/helpers';
|
|
8
|
+
import { getNavroot } from '@plone/volto/actions';
|
|
9
|
+
import config from '@plone/volto/registry';
|
|
10
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
11
|
+
|
|
12
|
+
const ContentMetadataTags = (props) => {
|
|
13
|
+
const {
|
|
14
|
+
opengraph_title,
|
|
15
|
+
opengraph_description,
|
|
16
|
+
seo_title,
|
|
17
|
+
seo_description,
|
|
18
|
+
seo_canonical_url,
|
|
19
|
+
seo_noindex,
|
|
20
|
+
title,
|
|
21
|
+
description,
|
|
22
|
+
} = props.content;
|
|
23
|
+
|
|
24
|
+
const dispatch = useDispatch();
|
|
25
|
+
const pathname = useSelector((state) => state.router.location.pathname);
|
|
26
|
+
const navroot = useSelector((state) => state.navroot?.data?.navroot);
|
|
27
|
+
const site = useSelector((state) => state.site?.data);
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (pathname && !hasApiExpander('navroot', getBaseUrl(pathname))) {
|
|
31
|
+
dispatch(getNavroot(getBaseUrl(pathname)));
|
|
32
|
+
}
|
|
33
|
+
}, [dispatch, pathname]);
|
|
34
|
+
|
|
35
|
+
const getContentImageInfo = () => {
|
|
36
|
+
const { contentMetadataTagsImageField } = config.settings;
|
|
37
|
+
const image = props.content[contentMetadataTagsImageField];
|
|
38
|
+
const { opengraph_image } = props.content;
|
|
39
|
+
|
|
40
|
+
const contentImageInfo = {
|
|
41
|
+
contentHasImage: false,
|
|
42
|
+
url: null,
|
|
43
|
+
height: null,
|
|
44
|
+
width: null,
|
|
45
|
+
};
|
|
46
|
+
contentImageInfo.contentHasImage =
|
|
47
|
+
opengraph_image?.scales?.large?.download ||
|
|
48
|
+
image?.scales?.large?.download ||
|
|
49
|
+
false;
|
|
50
|
+
|
|
51
|
+
if (contentImageInfo.contentHasImage && opengraph_image?.scales?.large) {
|
|
52
|
+
contentImageInfo.url = opengraph_image.scales.large.download;
|
|
53
|
+
contentImageInfo.height = opengraph_image.scales.large.height;
|
|
54
|
+
contentImageInfo.width = opengraph_image.scales.large.width;
|
|
55
|
+
} else if (contentImageInfo.contentHasImage) {
|
|
56
|
+
contentImageInfo.url = image.scales.large.download;
|
|
57
|
+
contentImageInfo.height = image.scales.large.height;
|
|
58
|
+
contentImageInfo.width = image.scales.large.width;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return contentImageInfo;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const contentImageInfo = getContentImageInfo();
|
|
65
|
+
|
|
66
|
+
const getTitle = () => {
|
|
67
|
+
const includeSiteTitle =
|
|
68
|
+
config?.settings?.siteTitleFormat?.includeSiteTitle || false;
|
|
69
|
+
const titleAndSiteTitleSeparator =
|
|
70
|
+
config?.settings?.titleAndSiteTitleSeparator || '-';
|
|
71
|
+
const navRootTitle = navroot?.title;
|
|
72
|
+
const contextIsRoot = navRootTitle === title;
|
|
73
|
+
const siteRootTitle = site?.['plone.site_title'];
|
|
74
|
+
const parentTitle = !contextIsRoot && props.content?.parent?.title;
|
|
75
|
+
|
|
76
|
+
const baseTitle = seo_title || title;
|
|
77
|
+
if (includeSiteTitle && siteRootTitle !== title) {
|
|
78
|
+
const parts = [
|
|
79
|
+
baseTitle,
|
|
80
|
+
parentTitle,
|
|
81
|
+
!contextIsRoot && navRootTitle !== parentTitle && navRootTitle,
|
|
82
|
+
].filter((part) => Boolean(part));
|
|
83
|
+
const titleWithSep = parts.join(` ${titleAndSiteTitleSeparator} `);
|
|
84
|
+
return siteRootTitle && siteRootTitle !== navRootTitle
|
|
85
|
+
? `${titleWithSep} ${siteRootTitle}`
|
|
86
|
+
: titleWithSep;
|
|
87
|
+
} else {
|
|
88
|
+
return baseTitle;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<>
|
|
94
|
+
<Helmet>
|
|
95
|
+
<title>{getTitle()?.replace(/\u00AD/g, '')}</title>
|
|
96
|
+
<link
|
|
97
|
+
rel="canonical"
|
|
98
|
+
href={seo_canonical_url || toPublicURL(props.content['@id'])}
|
|
99
|
+
/>
|
|
100
|
+
<meta name="description" content={seo_description || description} />
|
|
101
|
+
<meta
|
|
102
|
+
property="og:title"
|
|
103
|
+
content={opengraph_title || seo_title || title}
|
|
104
|
+
/>
|
|
105
|
+
<meta
|
|
106
|
+
property="og:url"
|
|
107
|
+
content={seo_canonical_url || toPublicURL(props.content['@id'])}
|
|
108
|
+
/>
|
|
109
|
+
{seo_noindex && <meta name="robots" content="noindex" />}
|
|
110
|
+
{contentImageInfo.contentHasImage && (
|
|
111
|
+
<meta
|
|
112
|
+
property="og:image"
|
|
113
|
+
content={toPublicURL(contentImageInfo.url)}
|
|
114
|
+
/>
|
|
115
|
+
)}
|
|
116
|
+
{contentImageInfo.contentHasImage && (
|
|
117
|
+
<meta property="og:image:width" content={contentImageInfo.width} />
|
|
118
|
+
)}
|
|
119
|
+
{contentImageInfo.contentHasImage && (
|
|
120
|
+
<meta property="og:image:height" content={contentImageInfo.height} />
|
|
121
|
+
)}
|
|
122
|
+
{(opengraph_description || seo_description || description) && (
|
|
123
|
+
<meta
|
|
124
|
+
property="og:description"
|
|
125
|
+
content={opengraph_description || seo_description || description}
|
|
126
|
+
/>
|
|
127
|
+
)}
|
|
128
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
129
|
+
</Helmet>
|
|
130
|
+
</>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export default ContentMetadataTags;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- Customize component to enhance title generation, see 292656 for detail
|