Skip to content
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/node_modules/
/static/images/vendor/
/static/fonts/vendor/
/static/js/
/static/css/
/public/
/.hugo/
/.project
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ hugo (
productionDomain: 'openhwfoundation.org',
build: [
containerImage: 'eclipsefdn/hugo-node:h0.144.2-n22.14.0',
script: 'build.sh',
],
deployment: [
nginxServerConf: 'config/nginx/default.conf'
Expand Down
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set -euo pipefail

yarn install --frozen-lockfile;
yarn build;
7 changes: 5 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ metaDataFormat = "yaml"
disableKinds = ["taxonomyTerm", "taxonomy"]
themesDir = "node_modules/"

# Vite handles static files via publicDir — prevent Hugo from copying them.
staticDir = []

[Params]
website_type = "Working Group"
google_tag_manager = "GTM-5WLCZXC"
Expand All @@ -17,14 +20,14 @@ themesDir = "node_modules/"
keywords = ["open-source", "risc-v", "hardware", "software", "hw", "sw", "eclipse ide"]
logo = "/images/openhw-landscape.png"
logo_width = "200"
styles = "css/styles.css"
styles = "less/styles.less"
js = "js/main.ts"
favicon = "images/favicon.ico"
# share_img = ""
gcse = ""
# subtheme = ""
header_wrapper_class = "header-default-bg-img"
hide_call_for_action = true
js = "js/solstice.js"
featured_content_publish_target = "openhwgroup"
call_for_action_text = "Download"
call_for_action_url = "#"
Expand Down
14 changes: 0 additions & 14 deletions js/main.js

This file was deleted.

45 changes: 45 additions & 0 deletions js/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*!
* Vite entry point — wraps js/main.js with jQuery global setup.
* jQuery must be on window.$ / window.jQuery BEFORE bootstrap and
* solstice-assets initialise, so we use top-level await + dynamic import
* to guarantee execution order (static imports are hoisted).
*
*/

// Patch addEventListener BEFORE loading any library code so that
// DOMContentLoaded listeners registered by eclipsefdn-solstice-assets
// fire immediately when the DOM is already ready (which it is, because
// <script type="module"> defers execution past DOMContentLoaded).
const _origAdd = EventTarget.prototype.addEventListener;
EventTarget.prototype.addEventListener = function (
this: EventTarget,
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
) {
if (
type === 'DOMContentLoaded' &&
this === document &&
document.readyState !== 'loading'
) {
// DOM already ready — call the listener on the next microtask so the
// calling module finishes evaluating first.
const fn =
typeof listener === 'function' ? listener : listener.handleEvent.bind(listener);
queueMicrotask(() => fn(new Event('DOMContentLoaded')));
return;
}
return _origAdd.call(this, type, listener, options);
};

import jQuery from 'jquery';
(globalThis as unknown as Record<string, unknown>).$ = jQuery;
(globalThis as unknown as Record<string, unknown>).jQuery = jQuery;

await import('eclipsefdn-solstice-assets/js/astro');

// Restore original addEventListener
EventTarget.prototype.addEventListener = _origAdd;

// Signal that jQuery + all plugins are ready for inline scripts
document.dispatchEvent(new Event('vite:ready'));
39 changes: 39 additions & 0 deletions layouts/partials/footer_js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div id="footer-js">
<!-- Placed at the end of the document so the pages load faster -->
{{- with .Site.Params.js }}
<script type="module" src="{{ . | relURL }}"></script>
{{ end }}

{{- with .Site.Params.hugo_js }}
<script src="{{ . | relURL }}"></script>
{{ end }}

<!-- Read in mustache templates registered in page scratch -->
{{ range $key, $value := (.Page.Scratch.Get "mustache-templates") }}
<script id="{{ $key }}" type="text/html">
{{ readFile $value | safeHTML}}
</script>
{{ end }}

<!-- Initialize any newsroom components on the page -->
<script>
document.addEventListener('vite:ready', function() {
(function($, document) {
{{ range (.Page.Scratch.Get "events-container-ids") }}
$("#{{ . }}").eclipseFdnApi({
type: "filteredEvents"
});
{{ end }}
{{ range (.Page.Scratch.Get "news-container-ids") }}
$("#{{ . }}").eclipseFdnApi({
type: "newsItems"
});
{{ end }}
})(jQuery, document);
});
</script>

{{ if eq (.Page.Scratch.Get "is_using_twitter") "true" }}
<script src="https://platform.twitter.com/widgets.js" async></script>
{{ end }}
</div>
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "eclipsefdn-hugo-openhwgroup",
"description": "Source code for openhwfoundation.org",
"main": "webpack.min.js",
"author": "Christopher Guindon",
"license": "EPL-2.0",
"version": "0.0.1",
Expand All @@ -10,19 +9,23 @@
},
"repository": {
"type": "git",
"url": "git://github.com/openhwgroup/openhwgroup.org.git"
"url": "git://github.com/openhwgroup/openhwfoundation.org.git"
},
"scripts": {
"dev": "NODE_ENV=development webpack --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "NODE_ENV=development webpack --watch --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "NODE_ENV=production webpack --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"postinstall": "NODE_ENV=production npm run production"
"dev": "concurrently \"hugo server --port 1313\" \"vite --open\"",
"build": "hugo --minify -d .hugo && vite build",
"preview": "vite preview"
},
"readmeFilename": "README.md",
"browserslist": "last 5 version, > 0.2%, not dead, IE 11",
"dependencies": {
"eclipsefdn-hugo-solstice-theme": "0.2.6"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
"devDependencies": {
"concurrently": "^9.2.1",
"less": "^4.6.4",
"smol-toml": "^1.6.1",
"vite": "^8.0.2"
}
}
Binary file added static/images/bg-jumbotron-default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bg-traces-alt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bg-traces.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions static/mix-manifest.json

This file was deleted.

Loading