eclipsefdn-hugo-solstice-theme 3.0.0 → 3.1.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.
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "public",
8
+ "baseBranch": "main",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # eclipsefdn-hugo-solstice-theme
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2e7f59d: [Params] Add support for an array of styles & scripts with ESM support in site config
8
+
9
+ ## 3.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 611ee9c: Fix `seo_title_suffix` not having a fallback which caused strange
14
+ output in title tags
15
+ - 4b531a5: Update eclipse.org menu's explore projects link
16
+ - e2a7ae1: Fix featured story popup not using the `publish_target` parameter
17
+
18
+ ## 3.0.0
19
+
20
+ ### Major Changes
21
+
22
+ - d95247d: Extract Neptune into its own package
23
+
24
+ ### Minor Changes
25
+
26
+ - 297c5d9: [Menu] Add Bring Your Project menu item
27
+
28
+ ## 2.0.0
29
+
30
+ ### Major Changes
31
+
32
+ - a703b87: Extract Astro into its own package
33
+
34
+ ## 1.0.1
35
+
36
+ ### Patch Changes
37
+
38
+ - 730d2dc: [SEO] Add seo_title_suffix fallback
39
+ - 18b980e: [Featured Story Popup] Fix publish target not applying
40
+
41
+ ## 1.0.0
42
+
43
+ ### Major Changes
44
+
45
+ - 49f11b9: Extract Quicksilver into its own package
46
+
47
+ ## 0.3.3
48
+
49
+ ### Patch Changes
50
+
51
+ - aa2ec26: Upgrade eclipsefdn-solstice-assets to 0.2.8 to resolve bugs
52
+ - 40a389d: Update @eclipsefdn/solstice-components peer dependency version
53
+
54
+ ## 0.3.2
55
+
56
+ ### Patch Changes
57
+
58
+ - 969234d: Upgrade dependencies
59
+
3
60
  ## 0.3.1
4
61
 
5
62
  ### Patch Changes
@@ -11,7 +68,7 @@
11
68
  ### Minor Changes
12
69
 
13
70
  - b1c65af: [Featured Story Popup] Add featured story popup component
14
- - d1e7e7c: Add solstice-components as peer dependency
71
+ - d1e7e7c: Add @eclipsefdn/solstice-components as peer dependency
15
72
 
16
73
  ## 0.2.6
17
74
 
@@ -23,7 +80,7 @@
23
80
 
24
81
  ### Patch Changes
25
82
 
26
- - 3177e60: Upgrade efsa to 0.2.4
83
+ - 3177e60: Upgrade eclipsefdn-solstice-assets to 0.2.4
27
84
 
28
85
  ## 0.2.4
29
86
 
@@ -37,7 +94,7 @@
37
94
 
38
95
  ### Patch Changes
39
96
 
40
- - b12ce69: Upgrade efsa to 0.2.2
97
+ - b12ce69: Upgrade eclipsefdn-solstice-assets to 0.2.2
41
98
 
42
99
  ## 0.2.2
43
100
 
@@ -54,7 +111,7 @@
54
111
 
55
112
  ### Patch Changes
56
113
 
57
- - 4d3a118: Upgrade efsa to 0.2.1
114
+ - 4d3a118: Upgrade eclipsefdn-solstice-assets to 0.2.1
58
115
  - d02c9fc: [Featured Footer] Fix publish target not applying
59
116
 
60
117
  ## 0.2.0
@@ -89,7 +146,7 @@
89
146
 
90
147
  ### Patch Changes
91
148
 
92
- - 312914d: Upgrade efsa to 0.1.21
149
+ - 312914d: Upgrade eclipsefdn-solstice-assets to 0.1.21
93
150
 
94
151
  ## 0.1.18
95
152
 
@@ -107,14 +164,14 @@
107
164
 
108
165
  ### Minor Changes
109
166
 
110
- - a25dd3d: Upgrade efsa to 0.1.18
167
+ - a25dd3d: Upgrade eclipsefdn-solstice-assets to 0.1.18
111
168
  - 229ce92: Add option to hide or unformat seo_title and seo_title_suffix
112
169
 
113
170
  ## 0.1.15
114
171
 
115
172
  ### Patch Changes
116
173
 
117
- - 0d3f05e: Upgrade efsa to 0.1.17
174
+ - 0d3f05e: Upgrade eclipsefdn-solstice-assets to 0.1.17
118
175
 
119
176
  ## 0.1.14
120
177
 
@@ -167,7 +224,7 @@
167
224
 
168
225
  ### Minor Changes
169
226
 
170
- - 7df36f1: Upgrade efsa to 0.1.10
227
+ - 7df36f1: Upgrade eclipsefdn-solstice-assets to 0.1.10
171
228
 
172
229
  ## 0.1.7
173
230
 
@@ -177,7 +234,7 @@
177
234
 
178
235
  ### Patch Changes
179
236
 
180
- - c64cfa0: Upgrade efsa
237
+ - c64cfa0: Upgrade eclipsefdn-solstice-assets
181
238
 
182
239
  ## 0.1.6
183
240
 
@@ -196,7 +253,7 @@
196
253
 
197
254
  ### Patch Changes
198
255
 
199
- - bd541ba: Upgrade efsa to 0.1.7
256
+ - bd541ba: Upgrade eclipsefdn-solstice-assets to 0.1.7
200
257
  - 49f1f23: Fix news pagination not appearing
201
258
 
202
259
  ## 0.1.3
@@ -209,7 +266,7 @@
209
266
 
210
267
  ### Patch Changes
211
268
 
212
- - 505f118: Upgrade efsa to 0.1.4
269
+ - 505f118: Upgrade eclipsefdn-solstice-assets to 0.1.4
213
270
 
214
271
  ## 0.1.1
215
272
 
package/config.toml CHANGED
@@ -157,7 +157,7 @@
157
157
 
158
158
  [[menu.neptune]]
159
159
  name = "Explore projects"
160
- url = "https://projects.eclipse.org/"
160
+ url = "https://www.eclipse.org/projects/"
161
161
  weight = 1
162
162
  parent = "projects"
163
163
 
@@ -15,8 +15,6 @@ baseURL = "https://webdev.eclipse.org/docs/hugo"
15
15
  keywords = ["hugo", "solstice", "eclipse foundation"]
16
16
  # logo = "images/logo/eclipse-foundation-white.svg"
17
17
  # favicon = "images/favicon.ico"
18
- styles = "css/neptune.css"
19
- js = "js/neptune.js"
20
18
  gcse = "011805775785170369411:p3ec0igo0qq"
21
19
  gcse_result_url = "/search"
22
20
  # eclipse_search_icon = "<i data-feather=\"search\" stroke-width=\"1\"></i>"
@@ -60,3 +58,11 @@ baseURL = "https://webdev.eclipse.org/docs/hugo"
60
58
  [blackfriday]
61
59
  plainIDAnchors = true
62
60
  hrefTargetBlank = true
61
+
62
+ [[Params.styles]]
63
+ url = "css/neptune.css"
64
+ cache = true
65
+
66
+ [[Params.scripts]]
67
+ url = "js/neptune.js"
68
+ cache = true
@@ -95,7 +95,7 @@
95
95
  [[main]]
96
96
  name = "Components"
97
97
  url = "/components/"
98
- weight = 3
98
+ weight = 1
99
99
  identifier = "components"
100
100
 
101
101
  [[main]]
@@ -130,17 +130,31 @@
130
130
  identifier = "deprecated"
131
131
  pre = "<i class=\"fa-solid fa-ban\" aria-hidden></i>"
132
132
 
133
+ [[main]]
134
+ name = "EclipseFdn Members List"
135
+ url = "/components/eclipsefdn_members_list/"
136
+ parent = "deprecated"
137
+
138
+ [[main]]
139
+ name = "EclipseFdn Projects page"
140
+ url = "/components/eclipsefdn_projects_page/"
141
+ parent = "deprecated"
142
+
133
143
  [[main]]
134
144
  name = "Meeting Minutes"
135
145
  url = "/components/meeting_minutes/"
136
146
  weight = 3
137
147
  parent = "deprecated"
138
148
 
149
+ [[main]]
150
+ name = "Newsroom News"
151
+ url = "/components/newsroom/news/"
152
+ parent = "deprecated"
153
+
139
154
  [[main]]
140
155
  name = "Membership"
141
156
  url = "/components/members/"
142
- weight = 3
143
- parent = "solstice"
157
+ parent = "deprecated"
144
158
 
145
159
  [[main]]
146
160
  name = "Taxonomy list"
@@ -178,24 +192,6 @@
178
192
  weight = 3
179
193
  parent = "solstice"
180
194
 
181
- [[main]]
182
- name = "Featured Story"
183
- url = "/components/featured_story/"
184
- weight = 3
185
- parent = "solstice"
186
-
187
- [[main]]
188
- name = "EclipseFdn Projects page"
189
- url = "/components/eclipsefdn_projects_page/"
190
- weight = 3
191
- parent = "solstice"
192
-
193
- [[main]]
194
- name = "EclipseFdn Members List"
195
- url = "/components/eclipsefdn_members_list/"
196
- weight = 4
197
- parent = "solstice"
198
-
199
195
  [[main]]
200
196
  name = "HTML Tables"
201
197
  url = "/components/tables/"
@@ -208,18 +204,6 @@
208
204
  weight = 3
209
205
  parent = "solstice"
210
206
 
211
- [[main]]
212
- name = "Twitter Timeline"
213
- url = "/components/twitter_timeline/"
214
- weight = 3
215
- parent = "solstice"
216
-
217
- [[main]]
218
- name = "Twitter Buttons"
219
- url = "/components/twitter_button/"
220
- weight = 3
221
- parent = "solstice"
222
-
223
207
  [[main]]
224
208
  name = "RSS Feed"
225
209
  url = "/components/rss/"
@@ -262,18 +246,6 @@
262
246
  weight = 3
263
247
  parent = "events"
264
248
 
265
- [[main]]
266
- name = "Newsroom News"
267
- url = "/components/newsroom/news/"
268
- weight = 3
269
- parent = "dynamic"
270
-
271
- [[main]]
272
- name = "Newsroom Events"
273
- url = "/components/newsroom/events/"
274
- weight = 3
275
- parent = "dynamic"
276
-
277
249
  [[main]]
278
250
  name = "Newsroom Resources"
279
251
  url = "/components/newsroom/resources/"
@@ -283,15 +255,34 @@
283
255
  [[main]]
284
256
  name = "News"
285
257
  url = "/components/news/"
286
- weight = 2
287
258
  parent = "deprecated"
288
259
 
289
260
  [[main]]
290
261
  name = "Events"
291
262
  url = "/components/events/"
292
- weight = 3
293
263
  parent = "deprecated"
294
264
 
265
+ [[main]]
266
+ name = "Newsroom Events"
267
+ url = "/components/newsroom/events/"
268
+ parent = "deprecated"
269
+
270
+ [[main]]
271
+ name = "X Timeline"
272
+ url = "/components/twitter_timeline/"
273
+ parent = "deprecated"
274
+
275
+ [[main]]
276
+ name = "X Buttons"
277
+ url = "/components/twitter_button/"
278
+ parent = "deprecated"
279
+
280
+ [[main]]
281
+ name = "Changelog"
282
+ url = "/changelog/"
283
+ weight = 3
284
+ identifier = "changelog"
285
+
295
286
  [[sidebar]]
296
287
  name = "Hugo Solstice Theme"
297
288
  url = "/"
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: "Changelog"
3
+ date: 2026-04-01T00:00:00Z
4
+ hide_page_title: true
5
+ hide_sidebar: true
6
+ type: "changelog"
7
+ ---
8
+
9
+
@@ -93,18 +93,30 @@ items:
93
93
  values:
94
94
  - "true"
95
95
  ref: /components/featured_footer/
96
- -
97
- name: show_featured_story
98
- description: Shows the featured story section at the top of the page if set to true, otherwise is ignored.
96
+ - name: scripts
97
+ description: Array of script objects to load on the page, rendered after site-level scripts. Each entry can define a type, url, cache, defer, and integrity.
99
98
  values:
100
- - "true"
101
- ref: /components/featured_story/
102
- -
103
- name: subtitle
104
- description: Used in the jumbotron, set in a second level header under the headline. Ignored if headline is not set.
99
+ - "Array of objects with the following properties: url (string, required), type (string, e.g. module), cache (boolean, appends ?v=timestamp to bust cache), defer (boolean), integrity (string)"
100
+ example: |
101
+ scripts:
102
+ - type: "module"
103
+ url: "/js/page-specific.mjs"
104
+ cache: true
105
+ - name: styles
106
+ description: Array of stylesheet objects to load on the page, rendered after site-level styles. Replaces the deprecated page_css_file param.
107
+ values:
108
+ - "Array of objects with the following properties: url (string, required), cache (boolean, appends ?v=timestamp to bust cache)"
109
+ example: |
110
+ styles:
111
+ - url: "/css/page-specific.css"
112
+ cache: true
113
+ -
114
+ name: page_css_file
115
+ deprecated: true
116
+ description: "Deprecated: use the page-level styles array instead. URL to an additional stylesheet to load on this page."
105
117
  values:
106
- - Any string value
107
- -
118
+ - Absolute links or fully qualified URLs.
119
+ -
108
120
  name: Summary
109
121
  description: Built in Hugo document parameter. Used in the head meta description if the Description parameter is not set.
110
122
  values:
@@ -146,23 +158,13 @@ items:
146
158
  values:
147
159
  - Any string value
148
160
 
149
- -
150
- name: format_title
151
- description: Formats the page title in headings and breadcrumbs to title case. If there is no value set, will default to true.
152
- values:
153
- - "false"
154
-
155
161
  -
156
162
  name: sidebar
157
163
  description: Target specific menu identifiers. Used when a page or sub-section uses different sidebar content than the rest of the section it's in. Each identifier must have a corresponding "menu.sidebar" entry in the site's "config" file. If this parameter is omitted, the default sidebar for the section is used.
158
164
  values:
159
165
  - An array of string values
160
- -
166
+ -
161
167
  name: body_class
162
168
  description: Add classes to the body element.
163
169
  values:
164
170
  - Any string value
165
- name: format_title
166
- description: Formats the page title in headings and breadcrumbs to title case. If there is no value set, will default to true.
167
- values:
168
- - "false"
@@ -23,13 +23,7 @@ items:
23
23
  description: Description of the overall site, used in a pages meta description if no page level description is set.
24
24
  values:
25
25
  - Any string value
26
- -
27
- name: facebook_url
28
- description: URL to the Facebook page for the site. If there is no value set, will default to Eclispe Foundation page.
29
- deprecated: "0.1.7"
30
- values:
31
- - Absolute link to Facebook profile
32
- -
26
+ -
33
27
  name: favicon
34
28
  description: URL to the favicon image for the site.
35
29
  values:
@@ -54,17 +48,7 @@ items:
54
48
  description: Used in the jumbotron.html layout file. Allow you to change the default value of col-md-20 col-md-offset-2 col-sm-18 col-sm-offset-3. Can be set at the site or page level.
55
49
  values:
56
50
  - Any string value
57
- -
58
- name: jumbotron_tagline_class
59
- description: Used in the jumbotron.html layout file. Allow you to change the default value of col-sm-18 col-sm-offset-3. Can be set at the site or page level.
60
- values:
61
- - Any string value
62
- -
63
- name: jumbotron_btn_class
64
- description: Used in the jumbotron.html layout file. Allow you to change the default value of btn btn-primary. Can be set at the site or page level.
65
- values:
66
- - Any string value
67
- -
51
+ -
68
52
  name: main_content_class
69
53
  description: Used in the main_prefix.html layout file. Allow you to change the default value of col-md-18 padding-bottom-30 is overriten. Can be set at the site or page level.
70
54
  values:
@@ -84,14 +68,10 @@ items:
84
68
  description: Hides the CFA button site-wide.
85
69
  value:
86
70
  - "true"
87
- -
88
- name: hide_cfa_same_page
89
- description: Attempt to hide CFA on the page it links to
90
- values:
91
- - "true"
92
- -
71
+ -
93
72
  name: js
94
- description: URL to the main javascript to be used on the site. This does not affect any scripts added in custom sctions of the site. Defaults to <a href="https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/main.min.js">main.min.js</a>
73
+ deprecated: true
74
+ description: "Deprecated: use [[Params.scripts]] array instead. URL to the main javascript to be used on the site. Defaults to <a href=\"https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/main.min.js\">main.min.js</a>"
95
75
  values:
96
76
  - Absolute link or fully qualified URL to a JS file
97
77
  -
@@ -100,19 +80,7 @@ items:
100
80
  values:
101
81
  - Array of strings
102
82
  example: '["tag1", "tag2", "tag3"]'
103
- -
104
- name: linkedin_url
105
- description: URL to the linkedin page for the site. If there is no value set, will default to Eclispe Foundation page.
106
- deprecated: "0.1.7"
107
- values:
108
- - Absolute link to linkedin profile
109
- -
110
- name: bluesky_url
111
- description: URL to the Bluesky page for the site. If there is no value set, will default to Eclispe Foundation page.
112
- deprecated: "0.1.7"
113
- values:
114
- - Absolute link to Bluesky profile
115
- -
83
+ -
116
84
  name: logo
117
85
  description: URL to the logo image for the site. If there is no other image set in page or site parameters, this image is used as the sharing image for social media links.
118
86
  values:
@@ -132,24 +100,23 @@ items:
132
100
  description: Boolean value, when set to true events will be enabled on the site.
133
101
  values:
134
102
  - "true"
135
- -
103
+ -
136
104
  name: styles
137
- description: URL to the stylesheet to be used on the site. This does not affect any stylesheets added in custom sctions of the site. Defaults to <a href="https://eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/quicksilver.min.css">quicksilver.min.css</a>
138
- values:
139
- - Absolute link or fully qualified URL to a CSS file
140
- -
141
- name: twitter_url
142
- description: URL to the Twitter page for the site. If there is no value set, will default to Eclispe Foundation page.
143
- deprecated: "0.1.7"
144
- values:
145
- - Absolute link to Twitter profile
146
- -
147
- name: youtube_url
148
- description: URL to the YouTube page for the site. If there is no value set, will default to Eclispe Foundation page.
149
- deprecated: "0.1.7"
105
+ description: Array of stylesheet objects to load site-wide. Each entry supports url and cache (appends ?v=timestamp). Page-level styles are always appended after site styles. Defaults to the Neptune stylesheet.
150
106
  values:
151
- - Absolute link to YouTube profile
152
- -
107
+ - "Array of objects with the following properties: url (string, required), cache (boolean, appends ?v=timestamp to bust cache)"
108
+ deprecated_values:
109
+ - "Deprecated string form: a single URL string — use [[Params.styles]] array instead. The legacy style_overrides string param is also deprecated in favour of adding additional entries to this array."
110
+ example: |
111
+ <pre>
112
+ [[Params.styles]]
113
+ url = "/css/main.css"
114
+ cache = true
115
+
116
+ [[Params.styles]]
117
+ url = "/css/overrides.css"
118
+ </pre>
119
+ -
153
120
  name: hide_breadcrumb
154
121
  description: Hides the breadcrumb on all pages if set to true, otherwise ignored.
155
122
  values:
@@ -164,6 +131,28 @@ items:
164
131
  description: Optional custom_jumbotron_class that will be used for custom_jumbotron.
165
132
  values:
166
133
  - Any string value
134
+ -
135
+ name: newsroom_esm
136
+ description: When set to true, the inline newsroom components script (events, news items) is rendered as an ES module using `import $ from "jquery"`. Defaults to false.
137
+ values:
138
+ - "true"
139
+ - "false"
140
+ - name: scripts
141
+ description: Array of script objects to load site-wide. Each entry can define a type, url, cache, defer, and integrity. When defined, this replaces the js and hugo_js params.
142
+ values:
143
+ - "Array of objects with the following properties: url (string, required), type (string, e.g. module), cache (boolean, appends ?v=timestamp to bust cache), defer (boolean), integrity (string)"
144
+ example: |
145
+ <pre>
146
+ [[Params.scripts]]
147
+ type = "module"
148
+ url = "/js/main.mjs"
149
+ cache = true
150
+
151
+ [[Params.scripts]]
152
+ defer = true
153
+ url = "https://some.cdn.com/js/script.js"
154
+ integrity = "sha384-..."
155
+ </pre>
167
156
  - name: socials
168
157
  values:
169
158
  - "Array of objects with the following properties: name (string), icon (string, Font Awesome 6 icon classes), url (string)"
@@ -0,0 +1,43 @@
1
+ {{ define "main" }}
2
+ {{ $changelog_url := "https://gitlab.eclipse.org/eclipsefdn/software-dev/frameworks-and-tools/hugo-solstice-theme/-/raw/main/CHANGELOG.md?ref_type=heads" }}
3
+ {{ with try (resources.GetRemote $changelog_url) }}
4
+ {{ with .Err }}
5
+ {{ errorf "%s" . }}
6
+ {{ else with .Value }}
7
+ {{ $changelog := .Content }}
8
+ {{ $changelog | markdownify }}
9
+ <script>
10
+ document.querySelector('h1').innerText = 'Changelog';
11
+ document.querySelectorAll('main li').forEach(li => {
12
+ const commitHashPattern = /([a-f0-9]{7}):/i;
13
+ li.childNodes.forEach(node => {
14
+ if (node.nodeType === Node.TEXT_NODE) {
15
+ // Check if the text node contains a commit hash pattern
16
+ const match = node.textContent.match(commitHashPattern);
17
+ if (match) {
18
+ const hash = match[1];
19
+ const url = `https://gitlab.eclipse.org/eclipsefdn/software-dev/frameworks-and-tools/hugo-solstice-theme/-/commit/${hash}`;
20
+
21
+ // Create a link element
22
+ const a = document.createElement('a');
23
+ a.href = url;
24
+ a.target = '_blank';
25
+ a.rel = 'noopener noreferrer';
26
+ a.textContent = match[0];
27
+
28
+ // Replace the text node with the link
29
+ const parts = node.textContent.split(match[0]);
30
+ const frag = document.createDocumentFragment();
31
+ frag.append(parts[0], a, parts[1]);
32
+
33
+ node.replaceWith(frag);
34
+ }
35
+ }
36
+ });
37
+ });
38
+ </script>
39
+ {{ else }}
40
+ {{ errorf "Unable to get remote resource %q" $changelog_url }}
41
+ {{ end }}
42
+ {{ end }}
43
+ {{ end }}
@@ -1,8 +1,9 @@
1
1
  {{ if .Page.Params.show_featured_story_popup }}
2
+ {{ $publish_target := .Page.Params.featured_content_publish_target | default .Site.Params.featured_content_publish_target | default "eclipse_org" }}
2
3
  <efsc-featured-story-popup
3
4
  autoopen='{"xs":false,"md":true}'
4
5
  variant="tertiary"
5
- publishtarget="eclipse_org"
6
+ publishtarget="{{ $publish_target }}"
6
7
  type="popup"
7
8
  ></efsc-featured-story-popup>
8
9
  <style>
@@ -1,13 +1,39 @@
1
1
  <div id="footer-js">
2
2
  <!-- Placed at the end of the document so the pages load faster -->
3
3
  {{- $default_js := "https://www.eclipse.org/public/js/neptune/main.js" -}}
4
- {{- with .Site.Params.js | default $default_js }}
5
- <script src="{{ . | relURL }}?v={{ now.Unix }}"></script>
6
- {{ end }}
4
+ {{- $site_scripts := .Site.Params.scripts -}}
5
+ {{- $page_scripts := .Page.Params.scripts -}}
7
6
 
8
- {{- with .Site.Params.hugo_js }}
7
+ {{- if $site_scripts -}}
8
+ {{- range $site_scripts -}}
9
+ {{- $src := .url | relURL -}}
10
+ {{- if .cache -}}{{- $src = printf "%s?v=%d" $src now.Unix -}}{{- end -}}
11
+ {{- $stag := printf `<script src="%s"` $src -}}
12
+ {{- with .type -}}{{- $stag = printf `%s type="%s"` $stag . -}}{{- end -}}
13
+ {{- if .defer -}}{{- $stag = printf "%s defer" $stag -}}{{- end -}}
14
+ {{- with .integrity -}}{{- $stag = printf `%s integrity="%s"` $stag . -}}{{- end -}}
15
+ {{- (printf "%s></script>" $stag) | safeHTML -}}
16
+ {{- end }}
17
+ {{- else if .Site.Params.js -}}
18
+ {{- warnf "Param 'Params.js' is deprecated. Use [[Params.scripts]] array instead. See https://webdev.eclipse.org/docs/hugo/" -}}
19
+ <script src="{{ .Site.Params.js | relURL }}?v={{ now.Unix }}"></script>
20
+ {{- with .Site.Params.hugo_js }}
21
+ {{- warnf "Param 'Params.hugo_js' is deprecated. Use [[Params.scripts]] array instead. See https://webdev.eclipse.org/docs/hugo/" -}}
9
22
  <script src="{{ . | relURL }}"></script>
10
- {{ end }}
23
+ {{- end }}
24
+ {{- else -}}
25
+ <script src="{{ $default_js | relURL }}?v={{ now.Unix }}"></script>
26
+ {{- end }}
27
+
28
+ {{- range $page_scripts -}}
29
+ {{- $src := .url | relURL -}}
30
+ {{- if .cache -}}{{- $src = printf "%s?v=%d" $src now.Unix -}}{{- end -}}
31
+ {{- $stag := printf `<script src="%s"` $src -}}
32
+ {{- with .type -}}{{- $stag = printf `%s type="%s"` $stag . -}}{{- end -}}
33
+ {{- if .defer -}}{{- $stag = printf "%s defer" $stag -}}{{- end -}}
34
+ {{- with .integrity -}}{{- $stag = printf `%s integrity="%s"` $stag . -}}{{- end -}}
35
+ {{- (printf "%s></script>" $stag) | safeHTML -}}
36
+ {{- end }}
11
37
 
12
38
  <!-- Read in mustache templates registered in page scratch -->
13
39
  {{ range $key, $value := (.Page.Scratch.Get "mustache-templates") }}
@@ -17,6 +43,21 @@
17
43
  {{ end }}
18
44
 
19
45
  <!-- Initialize any newsroom components on the page -->
46
+ {{ if (.Site.Params.newsroom_esm | default false) -}}
47
+ <script type="module">
48
+ import $ from "jquery";
49
+ {{ range (.Page.Scratch.Get "events-container-ids") }}
50
+ $("#{{ . }}").eclipseFdnApi({
51
+ type: "filteredEvents"
52
+ });
53
+ {{ end }}
54
+ {{ range (.Page.Scratch.Get "news-container-ids") }}
55
+ $("#{{ . }}").eclipseFdnApi({
56
+ type: "newsItems"
57
+ });
58
+ {{ end }}
59
+ </script>
60
+ {{- else -}}
20
61
  <script>
21
62
  (function($, document) {
22
63
  {{ range (.Page.Scratch.Get "events-container-ids") }}
@@ -31,6 +72,7 @@
31
72
  {{ end }}
32
73
  })(jQuery, document);
33
74
  </script>
75
+ {{- end }}
34
76
 
35
77
  {{ if eq (.Page.Scratch.Get "is_using_twitter") "true" }}
36
78
  <script src="https://platform.twitter.com/widgets.js" async></script>
@@ -10,9 +10,9 @@
10
10
 
11
11
  SPDX-License-Identifier: EPL-2.0
12
12
  -->
13
- <meta charset="utf-8">
14
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
15
- <meta name="viewport" content="width=device-width, initial-scale=1">
13
+ <meta charset="utf-8" />
14
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
15
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
16
16
  <!-- Site Title, Description, Author, and Favicon -->
17
17
  {{ $title := .Params.seo_title | default (.Params.headline | plainify) | default (.Title | plainify) | default .Site.Title }}
18
18
  {{ if (.Params.format_seo_title | default true) }}
@@ -20,51 +20,58 @@
20
20
  {{ end }}
21
21
  {{ $title_suffix := "" }}
22
22
  {{ if not .Params.hide_seo_title_suffix }}
23
- {{ $title_suffix = .Params.seo_title_suffix | default .Site.Params.seo_title_suffix }}
23
+ {{ $title_suffix = .Params.seo_title_suffix | default .Site.Params.seo_title_suffix | default "" }}
24
24
  {{ end }}
25
25
  {{ $full_title := printf "%s%s" $title $title_suffix }}
26
26
  <title>{{ $full_title }}</title>
27
27
  <meta property="og:title" content="{{ $full_title }}" />
28
- <meta name="twitter:title" content="{{ $title | truncate 70 }}{{ $title_suffix }}" />
28
+ <meta
29
+ name="twitter:title"
30
+ content="{{ $title | truncate 70 }}{{ $title_suffix }}"
31
+ />
29
32
  {{ if isset .Page.Params "redirect_url" }}
30
- <link rel="canonical" href="{{ .Page.Params.redirect_url }}"/>
31
- <meta name="robots" content="noindex">
32
- <meta http-equiv="refresh" content="0; url={{ .Page.Params.redirect_url }}" />
33
+ <link rel="canonical" href="{{ .Page.Params.redirect_url }}" />
34
+ <meta name="robots" content="noindex" />
35
+ <meta http-equiv="refresh" content="0; url={{ .Page.Params.redirect_url }}" />
33
36
  {{ end }}
34
37
  {{- with .Description | default .Page.Params.summary | default .Site.Params.description | plainify }}
35
- {{- with . | replaceRE "{{[\\s\\S]*?}}" " " | truncate 160 }}
36
- <meta name="description" content="{{ . }}">
37
- <meta property="og:description" content="{{ . }}">
38
- <meta name="twitter:description" content="{{ . }}">
39
- {{- end }}
38
+ {{- $description_clean_pattern := "{{[\\s\\S]*? }}\\s*" -}}
39
+ {{- with . | replaceRE $description_clean_pattern " " | truncate 160 }}
40
+ <meta name="description" content="{{ . }}" />
41
+ <meta property="og:description" content="{{ . }}" />
42
+ <meta name="twitter:description" content="{{ . }}" />
43
+ {{- end }}
40
44
  {{- end }}
41
45
  {{- with .Page.Params.author }}
42
- <meta name="author" content="{{ . }}"/>
46
+ <meta name="author" content="{{ . }}" />
43
47
  {{- end }}
44
- {{- with .Params.page_favicon | default .Site.Params.favicon | default "https://www.eclipse.org/favicon.ico"}}
45
- <link href='{{ . | relURL }}' rel='icon' type='image/x-icon'/>
48
+ {{- with .Params.page_favicon | default .Site.Params.favicon | default "https://www.eclipse.org/favicon.ico" }}
49
+ <link href="{{ . | relURL }}" rel="icon" type="image/x-icon" />
46
50
  {{- end -}}
47
51
  {{- with .Page.Params.metatag_robots }}
48
- <meta name="robots" content="{{ . }}">
52
+ <meta name="robots" content="{{ . }}" />
49
53
  {{- end }}
50
54
  <!-- Social Media Tags -->
51
55
  {{- with .Params.share_img | default .Params.image | default .Site.Params.share_img | default .Site.Params.logo }}
52
- <meta property="og:image" content="{{ . | absURL }}" />
53
- <meta name="twitter:image" content="{{ . | absURL }}" />
56
+ <meta property="og:image" content="{{ . | absURL }}" />
57
+ <meta name="twitter:image" content="{{ . | absURL }}" />
54
58
  {{- end }}
55
59
  <meta name="twitter:card" content="summary" />
56
60
  {{- with .Site.Params.author.twitter }}
57
- <meta name="twitter:site" content="@{{ . }}" />
58
- <meta name="twitter:creator" content="@{{ . }}" />
61
+ <meta name="twitter:site" content="@{{ . }}" />
62
+ <meta name="twitter:creator" content="@{{ . }}" />
59
63
  {{- end }}
60
64
  {{- with .Site.Params.fb_app_id }}
61
- <meta property="fb:app_id" content="{{ . }}" />
65
+ <meta property="fb:app_id" content="{{ . }}" />
62
66
  {{- end }}
63
67
  <meta property="og:url" content="{{ .Permalink | absLangURL }}" />
64
68
  <meta property="og:type" content="website" />
65
69
  <meta property="og:site_name" content="{{ .Site.Title }}" />
66
70
  {{- with .Keywords | default .Site.Params.keywords }}
67
- <meta name="keywords" content="{{ range $i, $e := . }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}">
71
+ <meta
72
+ name="keywords"
73
+ content="{{ range $i, $e := . }}{{ if $i }},{{ end }}{{ $e }}{{ end }}"
74
+ />
68
75
  {{ end }}
69
76
  <!-- Hugo Version number -->
70
77
  {{ hugo.Generator -}}
@@ -72,33 +79,66 @@
72
79
  {{ $canonical_url := (.Page.Params.canonical_url | default .Permalink) | absLangURL }}
73
80
  <link rel="canonical" href="{{ $canonical_url }}" />
74
81
  {{ with .OutputFormats.Get "RSS" }}
75
- <link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="">
82
+ <link
83
+ rel="alternate"
84
+ href="{{ .RelPermalink }}"
85
+ type="application/rss+xml"
86
+ title=""
87
+ />
76
88
  {{ end }}
77
89
  {{ if ne .Page.Params.disable_css "true" }}
78
- {{- $default_css := "https://www.eclipse.org/public/css/neptune.css" -}}
79
- {{- with .Site.Params.styles | default $default_css }}
80
- <link rel="stylesheet" href="{{ . | relURL }}?v={{ now.Unix }}">
81
- {{- end }}
82
- {{- with .Site.Params.style_overrides }}
83
- <link rel="stylesheet" href="{{ . | relURL }}?v={{ now.Unix }}">
84
- {{- end }}
85
- {{- with .Page.Params.page_css_file }}
86
- <link rel="stylesheet" href="{{ . | relURL }}?v={{ now.Unix }}">
87
- {{- end }}
90
+ {{- $default_css := "https://www.eclipse.org/public/css/neptune.css" -}}
91
+ {{- $site_styles := .Site.Params.styles -}}
92
+ {{- $page_styles := .Page.Params.styles -}}
93
+
94
+ {{- if $site_styles -}}
95
+ {{- range $site_styles -}}
96
+ {{- $href := .url | relURL -}}
97
+ {{- if .cache -}}
98
+ {{- $href = printf "%s?v=%d" $href now.Unix -}}
99
+ {{- end -}}
100
+ <link rel="stylesheet" href="{{ $href }}" />
101
+ {{- end }}
102
+ {{- else if .Site.Params.styles -}}
103
+ {{- warnf "Param 'Params.styles' is deprecated. Use [[Params.styles]] array instead. See https://webdev.eclipse.org/docs/hugo/" -}}
104
+ <link rel="stylesheet" href="{{ .Site.Params.styles | relURL }}?v={{ now.Unix }}" />
105
+ {{- with .Site.Params.style_overrides }}
106
+ {{- warnf "Param 'Params.style_overrides' is deprecated. Use [[Params.styles]] array instead. See https://webdev.eclipse.org/docs/hugo/" -}}
107
+ <link rel="stylesheet" href="{{ . | relURL }}?v={{ now.Unix }}" />
108
+ {{- end }}
109
+ {{- else -}}
110
+ <link
111
+ rel="stylesheet"
112
+ href="{{ $default_css | relURL }}?v={{ now.Unix }}"
113
+ />
114
+ {{- end }}
115
+
116
+ {{- range $page_styles -}}
117
+ {{- $href := .url | relURL -}}
118
+ {{- if .cache -}}{{- $href = printf "%s?v=%d" $href now.Unix -}}{{- end -}}
119
+ <link rel="stylesheet" href="{{ $href }}" />
120
+ {{- end }}
121
+
122
+ {{- if not $page_styles -}}
123
+ {{- with .Page.Params.page_css_file }}
124
+ {{- warnf "Page param 'page_css_file' is deprecated. Use the page-level styles array instead. See https://webdev.eclipse.org/docs/hugo/" -}}
125
+ <link rel="stylesheet" href="{{ . | relURL }}?v={{ now.Unix }}" />
126
+ {{- end }}
127
+ {{- end }}
88
128
  {{- end }}
89
129
  {{- partial "google_tag_manager.html" . }}
90
130
  {{- partial "head_variables.html" . }}
91
131
 
92
132
  {{ $metadata := .Page.Params.metadata | default slice }}
93
133
  {{ range $metadata }}
94
- {{ $path_parts := split .path "/" }}
95
- {{ $data := $.Site.Data }}
96
- {{ range $path_parts }}
134
+ {{ $path_parts := split .path "/" }}
135
+ {{ $data := $.Site.Data }}
136
+ {{ range $path_parts }}
97
137
  {{ $data = index $data . }}
98
138
  {{ end }}
99
139
  {{ if eq .type "ld+json" }}
100
140
  <script type="application/ld+json">
101
- {{ with $data }}
141
+ {{ with $data }}
102
142
  {{ . }}
103
143
  {{ end }}
104
144
  </script>
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "webpack.min.js",
5
5
  "author": "Christopher Guindon",
6
6
  "license": "EPL-2.0",
7
- "version": "3.0.0",
7
+ "version": "3.1.0",
8
8
  "bugs": {
9
9
  "url": "https://gitlab.eclipse.org/eclipsefdn/it/webdev/hugo-solstice-theme/-/issues"
10
10
  },
@@ -18,16 +18,19 @@
18
18
  "hot": "NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
19
19
  "production": "NODE_ENV=production webpack --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
20
20
  "fetch_project": "node bin/projects/index.js -l exampleSite/data",
21
- "build": "npm run production && npm run fetch_project"
21
+ "build": "npm run production && npm run fetch_project",
22
+ "changeset": "changeset"
22
23
  },
23
24
  "readmeFilename": "README.md",
24
25
  "dependencies": {
25
- "eclipsefdn-solstice-assets": "0.2.8",
26
+ "eclipsefdn-solstice-assets": "0.2.9",
26
27
  "json2yaml": "^1.1.0",
27
28
  "toml": "^3.0.0"
28
29
  },
29
30
  "browserslist": "last 5 version, > 0.2%, not dead, IE 11",
30
- "devDependencies": {},
31
+ "devDependencies": {
32
+ "@changesets/cli": "^2.31.0"
33
+ },
31
34
  "peerDependencies": {
32
35
  "@eclipsefdn/solstice-components": ">=0.7.0 <1.0.0"
33
36
  }