Skip to content

Fix: Update deprecated Hugo syntax to restore local build compatibility#46

Open
rishav-raj-genx wants to merge 1 commit intogambitproject:mainfrom
rishav-raj-genx:fix-website-bugs
Open

Fix: Update deprecated Hugo syntax to restore local build compatibility#46
rishav-raj-genx wants to merge 1 commit intogambitproject:mainfrom
rishav-raj-genx:fix-website-bugs

Conversation

@rishav-raj-genx
Copy link

While setting up the gambitproject.github.io codebase locally to understand the frontend architecture, improve responsiveness, and explore potential UI contributions, I encountered fatal build errors. Modern versions of Hugo (v0.114+) have deprecated the .Site.IsServer command, which was causing the local development server to crash when compiling the scientific-python-hugo-theme.

To resolve this without altering the core functionality of the site or modifying the external theme submodule directly, I utilized Hugo's layout override feature.

Changes Made

-> Created local overrides for themes/scientific-python-hugo-theme/layouts/partials/css.html and layouts/partials/javascript.html.

-> Updated the deprecated .Site.IsServer calls to the modern global hugo.IsServer syntax.

-> Retained 100% of the site's original functionality and visual design.

*This update ensures that future contributors using modern, up-to-date Homebrew/Hugo environments can successfully build and serve the website locally without encountering legacy syntax errors.

Context - I am really enjoying exploring the Gambit ecosystem! I am setting up my environment as I am highly interested in the frontend development side of Gambit, specifically the GSoC "Idea 2: GameInterpreter" project. Looking forward to diving deeper into the codebase!

Fixes #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Local build failure: deprecated .Site.IsServer syntax in Hugo them

1 participant