Skip to content

Jekyll to Hugo migration - #979

Merged
MakisH merged 45 commits into
masterfrom
hugo
Oct 20, 2026
Merged

MakisH merged 45 commits into
masterfrom
hugo

Conversation

@MuhammadAashirAslam

@MuhammadAashirAslam MuhammadAashirAslam commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

This PR completes the migration of the preCICE website from Jekyll to Hugo.

Summary of Changes

1. Directory Structure & Asset Migration

  • Static Assets Relocation: Moved public static assets from legacy root folders (images/, css/, js/) into Hugo's standard static/ directory (static/images/, static/css/, static/js/, static/assets/data/).
  • Content Hierarchy: Reorganized Markdown files from into Hugo's section-aware content/ tree (content/docs/, content/community/, content/tutorials/, content/about.md).

2. Architecture & Dependency Management

  • Hugo Modules: Replaced Git submodules and custom Ruby import scripts with native Hugo Modules (config/_default/module.toml, go.mod, go.sum). Imported adapter and tutorial repositories are now fetched and pinned as Hugo modules.
  • Configuration: Structured site settings into modular TOML files (config/_default/hugo.toml, module.toml, params.toml).

3. Layouts, Partials & Shortcodes

  • Reimplemented all Jekyll Liquid templates and includes in Go HTML templates (layouts/ and layouts/partials/).
  • Ported custom Jekyll tags to native Hugo shortcodes ({{< warning >}}, {{< note >}}, {{< tip >}}, {{< pagebreak >}}, etc.).
  • Preserved all existing permalinks and historical URLs using Hugo aliases to ensure zero broken bookmarks or external links.

4. Search Integration (Algolia)

  • Migrated the search pipeline to a dedicated Node.js indexing tool (tools/algolia-index.mjs).
  • Hugo generates public/algolia.json during the production build, which the CLI validates (schema check, record size limits) and uploads using atomic index replacement.

5. Offline PDF Generation

  • Ported the Prince XML documentation build to Hugo (tools/pdf-docs.sh).
  • Configured dedicated PDF layout templates (config/pdf/, layouts/partials/pdf/) to build the consolidated offline PDF directly from the Hugo content tree.

6. GitHub Actions & Automation Workflows

  • build.yml: Streamlined CI to test both standard website generation and Algolia dry-run indexing.
  • update-submodules.yml: Modernized to update Hugo module revisions (tools/sync_hugo_modules.py), supporting both daily schedules and repository_dispatch triggers from external repositories.
  • update-discourse-data.yml: Scheduled sync for Discourse forum topics, announcements, and FAQs.
  • update-algolia.yml: Automated search index publishing on releases/pushes.

7. Documentation & Contributor Setup

  • Updated README.md with streamlined local development instructions (hugo server) and contributing checks (pre-commit).
  • Updated developer documentation (content/docs/docs-meta/) covering site architecture, adding imported repositories, search indexing, and PDF generation.

Testing & Verification

  • Local development server runs cleanly (hugo server).
  • Production build passes without errors or warnings (hugo --gc --minify --cleanDestinationDir --environment production).
  • Algolia search index dry-run validation passes (npm --prefix tools run algolia:index -- --dry-run).
  • PDF generation produces clean output (./tools/pdf-docs.sh).
  • Static assets, images, and fonts resolve correctly across all pages.
  • URL aliases, navigation sidebars, and internal links verified.

@MakisH
MakisH self-requested a review August 29, 2026 09:51
@MakisH MakisH self-assigned this Aug 29, 2026
@MakisH MakisH added the technical Technical issues on the website label Aug 29, 2026
@MakisH

MakisH commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

Thank you for the PR and again for all the work in the previous PRs! Building everything together already looks very complete and almost indistinguishable from the previous state.

Some issues on the current state:

  1. In some pages (section overviews of imported modules with multiple pages), links to the rest of the sections appear at the bottom of the overview (section) page. Any idea why? We should remove these. Appears in (links to localhost):
  2. The system tests page needs to be updated to point to tutorials/tests/README.md (previously tutorials/tools/tests/README.md).
  3. In the About page, there is a statement about the development of the website. I can add more details there to keep the whole history in context. I would link to your GSoC report. Is that ok? I will do that after your changes.
  4. In the search, publications still show up as individual pages (example). Could we add some text around it explaining that this is a publication entry and point to the literature guide for more?
    1. In the linked example, the rendering of the card shows some entries outside the card frame.

Could you please also resolve the merge conflicts? They should mostly be trivial.

@MakisH

MakisH commented Aug 29, 2026

Copy link
Copy Markdown
Member

Also closes #342, #471, #538, #539, #590, #932.

Related to #411, #472.

It also addresses many of the points discussed in #897 (still with Prince).

@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator Author
  1. Done (9d35e46)
  2. Done (fa1bcb1)
  3. Yeah sure 😊
  4. Done (ccbdd50), added some information and link to the literature guide

Also solved the merge conflicts

@MakisH

MakisH commented Sep 11, 2026

Copy link
Copy Markdown
Member

Since a new Hugo release is available, let's see: how easy is it to update?

@MuhammadAashirAslam

MuhammadAashirAslam commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Bumped the versions (also for GO while we at it ) in 95a5610 , other than that nothing interesting caught my eye in the new release.

@fsimonis fsimonis left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, this port is AMAZING, so well done @MuhammadAashirAslam!
Building this is so easy now and live editting is now actually a reality.
That said, is it possible to live edit files in the included modules? It would be a pretty big downer if this wasn't possible.

I tested the version locally and found some things which I commented on the files. Most important here is that the modules file needs some kind of autogeneration. Currently this is unmaintainable.

The sidebar still has links to the old URLs, so they trigger a redirect and thus a stutter. They should link to the new location.
The sidebar is not really needed. We should still port that to the menus. Maybe in another PR.

We have some weird links that lead to strange behaviour when navigating the website as they are located in multiple places at the same time: The quickstart and the current events.
This looks super weird, we need some solution here.

For the current events: @MakisH maybe the cleanest is to redirect to the entry. Current events could be always visible links above the sidebar, when they exist.

I think the Quickstart needs to decide if it wants to be /tutorial/quickstart/ or /quickstart/.

The community sections don't have section pages yet as they are empty.
Also the minisymposia section is called "Other events", we should maybe fix this @MakisH.

Also the README reads weird. Lines are broken at 80 chars. Could you break on sentence ends. This makes it easier to read.

Comment thread layouts/index.sitemapindex.xml Outdated
Comment thread doxygen/patch.sh Outdated
Comment thread config/_default/module.toml
Comment thread layouts/robots.txt Outdated
@MakisH MakisH mentioned this pull request Sep 14, 2026
@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator Author

First of all, this port is AMAZING, so well done @MuhammadAashirAslam!

Thankyou 🤗

That said, is it possible to live edit files in the included modules? It would be a pretty big downer if this wasn't possible.

Yes it is possible , you just have to point the modules to your local directory of the module with hugo serve . Example , if i have open foam and the precice website folder in the same directory i can do this.

HUGO_MODULE_REPLACEMENTS="github.com/precice/openfoam-adapter -> $(pwd)/../openfoam-adapter" hugo server

For more you can just add more paths with a separation of a comma

HUGO_MODULE_REPLACEMENTS="github.com/precice/openfoam-adapter -> $(pwd)/../openfoam-adapter, github.com/precice/tutorials -> $(pwd)/../tutorials" hugo server

Most important here is that the modules file needs some kind of autogeneration. Currently this is unmaintainable.

This is a problem i have tried python scripts but they have some drawbacks and occasionally i hit the github too many requests error in the workflow . I will work on this a bit more and start with the tutorials as they require the most changing (adding new tutorials ) while other modules aren't changed that much.

The sidebar still has links to the old URLs, so they trigger a redirect and thus a stutter.

Done 6750fd7

The sidebar is not really needed. We should still port that to the menus. Maybe in another PR.

Looking in to this

Also the README reads weird. Lines are broken at 80 chars. Could you break on sentence ends. This makes it easier to read.

Done 5af53c3

@fsimonis

Copy link
Copy Markdown
Member

HUGO_MODULE_REPLACEMENTS="github.com/precice/openfoam-adapter -> $(pwd)/../openfoam-adapter, github.com/precice/tutorials -&gt; $(pwd)/../tutorials" hugo server

Haha. This is not really easy to use. Could you provide a python wrapper for the modules that builds this override, sets it as an env and then runs hugo with the remaining arguments?

tools/local-hugo --tutorials=../tutorials server

That would be super helpful!

This is a problem i have tried python scripts but they have some drawbacks and occasionally i hit the github too many requests error in the workflow . I will work on this a bit more and start with the tutorials as they require the most changing (adding new tutorials ) while other modules aren't changed that much.

Ah. From experience, I can tell that poking at git repos is often easiest with a local shallow clone.

You can create a temporary directory in memory: tempfile.TemporaryDirectory
And then git clone --depth=1 (you could also --filter) all projects you need there and work on these local copies, which are then also clean up automatically.

Comment thread README.md Outdated
@fsimonis

Copy link
Copy Markdown
Member

As far as I can tell, the only thing missing now is generating the modules file.

I see this as a hard requirement. The local hugo #987 is a nice to have.

@MakisH

MakisH commented Sep 23, 2026

Copy link
Copy Markdown
Member

FYI, I am waiting for settling on @fsimonis' review comments before I continue with my review. The main point currently seems to be the missing tools/sync_tutorials.py.

@MuhammadAashirAslam please let me know once I can have another look.

After merging this and #987, I will proceed with migrating the library-specific documentation pages to the library repository.

@fsimonis

fsimonis commented Oct 8, 2026

Copy link
Copy Markdown
Member

I have the feeling that it will come around and bite us later, but I am ok with a non-autogenerated modules file. #990 adds a script for autogenerating the massive tutorials-part, so we have something to work with.

I did another review and noticed that we use npm to install algoliasearch and provide a custom launcher.
Is there a reason we don't install the official algolia cli via the Debian package instead?
This would eliminate the entire node.js requirement.

@MakisH
MakisH self-requested a review October 8, 2026 08:49
@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator Author

I did another review and noticed that we use npm to install algoliasearch and provide a custom launcher.
Is there a reason we don't install the official algolia cli via the Debian package instead?

The reason we didn't use the official Algolia CLI is that the CLI is only a transport/API tool (algolia objects import)—it expects pre-structured JSON/NDJSON records and cannot parse HTML.

In Jekyll, jekyll-algolia handled the heavy lifting of parsing the rendered HTML DOM.

Hugo has no built-in DOM parser and can only export raw page HTML blobs . In index.algolia.json. tools/algolia-index.mjs (via Cheerio) reproduces the jekyll-algolia like extraction and chunking pipeline before uploading. If we used the Algolia CLI, we would still need an HTML extraction script to generate the NDJSON records beforehand .

MakisH and others added 25 commits October 20, 2026 10:49
Co-authored-by: Gerasimos Chourdakis <gerasimos.chourdakis@ipvs.uni-stuttgart.de>
Also update content with recent changes.

Co-authored-by: Gerasimos Chourdakis <gerasimos.chourdakis@ipvs.uni-stuttgart.de>
Also: remove obsolete doxygen assets, update CI workflows
Co-authored-by: Frédéric Simonis <simonisfrederic@gmail.com>
Co-authored-by: Frédéric Simonis <simonisfrederic@gmail.com>
- Re-enable news banner and fix typo
- Update number of citations
- Fix URLs in HTML maps
- Configure double dollar math delimiters as inline in Goldmark passthrough
- Remove failing LaTeX align example

@MakisH MakisH left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cleaned-up the history, removing merge commits and squashing some related commits together. I added the Hugo: prefix in the commit messages, so that I can do a simple merge and maintain an overview with smaller commits (especially retaining the links to the PRs in the early commits).

I once again checked the rendering of the most relevant pages locally and had another look at the files structure. All good.

P.S.: As stated earlier, the build CI workflow does not start because it has been renamed. All other checks pass.

@MakisH
MakisH merged commit 28e404a into master Oct 20, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Needs review to Done in GSoC 2026: Website modernization Oct 20, 2026
@MakisH MakisH mentioned this pull request Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Technical issues on the website

Development

Successfully merging this pull request may close these issues.

3 participants