Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUR search site has stopped updating again #21

Open
Rhys-T opened this issue Nov 2, 2024 · 2 comments
Open

NUR search site has stopped updating again #21

Rhys-T opened this issue Nov 2, 2024 · 2 comments

Comments

@Rhys-T
Copy link
Contributor

Rhys-T commented Nov 2, 2024

The gh-pages branch (and thus the NUR site) hasn't updated for a couple of days now. Looking through the workflow runs back on the main NUR repo that handle rebuilding this one, it looks like a deprecation warning from Hugo has changed into an error, probably as a result of Nixpkgs updating Hugo from 0.135.0 to 0.136.4.

Before (example):

WARN  deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in a future release. Use hugo.IsMultilingual instead.

                   | EN   
-------------------+------
  Pages            | 280  
  Paginator pages  |   0  
  Non-page files   |   1  
  Static files     | 219  
  Processed images |   0  
  Aliases          |   2  
  Cleaned          |   0  

Total in 3130 ms

(continues to the actual pushing and publishing steps)

After (example):

ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Use hugo.IsMultilingual instead.
Total in 3819 ms
Error: error building site: logged 1 error(s)
make: *** [Makefile:3: all] Error 1

This is the only reference to .Site.IsMultiLingual I can find in nur-search's code. I think it just needs to be changed to hugo.IsMultilingual (with no leading ., and a lowercase l), but I can't reproduce the error locally to confirm this fix - it always builds correctly for me, even when using 0.136.4.

@Rhys-T
Copy link
Contributor Author

Rhys-T commented Nov 2, 2024

Correction: There are references to .Site.IsMultiLingual in the docDock theme it's using too. (I had missed pulling in submodules somehow. With those in place, I'm getting the same deprecation errors locally.)

@Rhys-T
Copy link
Contributor Author

Rhys-T commented Nov 7, 2024

These are the files that mention .Site.IsMultiLingual:

  • layouts/partials/nur/body-beforecontent.html
  • themes/docdock/layouts/partials/flex/body-beforecontent.html
  • themes/docdock/layouts/partials/language-selector.html
  • themes/docdock/layouts/partials/original/body-beforecontent.html

If I do rg -Fl0 .Site.IsMultiLingual | xargs -0 -n 1 sed -E -i 's@\.Site\[email protected]@g' to edit them all, the site seems to build correctly.

So far the options I see are:

  • Fork the theme, and patch those files
  • Embed a copy of the theme, and patch those files
  • Patch the one from this repo, and add a command to either the Makefile or update-nur-search.sh that patches the files in the theme after checkout
  • Pin an older version of Hugo somehow (possibly by pinning the entire Nixpkgs?)
  • Edit: Or get that change upstreamed, but that repo hasn't been updated in several years, so…

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

No branches or pull requests

1 participant