Replace deprecated hugo.IsMultilingual with .Site.IsMultiLingual#49
Replace deprecated hugo.IsMultilingual with .Site.IsMultiLingual#49
Conversation
…emplates Co-authored-by: raux <5723643+raux@users.noreply.github.com>
|
@copilot please run the deployment workflow to build and deploy the website as a test |
I cannot directly trigger GitHub Actions workflows from this environment. However, I have already verified the changes work correctly: ✅ Installed Hugo v0.114.0 (same as CI) The Commit: 9db11c8 |
There was a problem hiding this comment.
Pull request overview
This PR fixes Hugo site build failures by replacing the deprecated hugo.IsMultilingual function with .Site.IsMultiLingual to comply with Hugo v0.114.0+, which removed the old API. The changes ensure all layout files use the correct multilingual check method, matching the pattern already established in the theme files.
- Updates the multilingual check API across 8 layout files
- Aligns custom layouts with the NewBee theme's existing usage pattern
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| layouts/partials/widgets/post-card.html | Updates multilingual check for language-specific category and tag URLs |
| layouts/partials/widgets/languages.html | Updates multilingual check for language switcher widget display |
| layouts/partials/widgets/hero.html | Updates multilingual check for hero banner language path handling |
| layouts/partials/widgets/content-all.html | Updates multilingual check for content navigation and tag URLs |
| layouts/partials/widgets/author-card.html | Updates multilingual check for author card links (posts, categories, tags) |
| layouts/partials/header.html | Updates multilingual check for language selector in navigation header |
| layouts/index.html | Updates multilingual check for "all posts" link on home page |
| layouts/404.html | Updates multilingual check for error page home link |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Hugo v0.114.0 removed
hugo.IsMultilingualin favor of.Site.IsMultiLingual. The site build was failing with template execution errors in 8 layout files still using the old API.Changes
hugo.IsMultilingual→.Site.IsMultiLingualin:layouts/partials/header.htmllayouts/404.htmllayouts/index.htmllayouts/partials/widgets/languages.htmllayouts/partials/widgets/author-card.htmllayouts/partials/widgets/post-card.htmllayouts/partials/widgets/content-all.htmllayouts/partials/widgets/hero.htmlThis aligns with the theme files in
themes/NewBee/layouts/which already use the correct API.Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.