McShelby / hugo-theme-relearn

A theme for Hugo designed for documentation
https://mcshelby.github.io/hugo-theme-relearn/
MIT License
383 stars 178 forks source link

Deprecation warning for .Sites.First and .Site.IsMultiLingual #920

Closed Iftakharpy closed 6 hours ago

Iftakharpy commented 6 hours ago

Running hugo serve shows deprecation warning for using .Sites.First and .Site.IsMultiLingual in partials.

Hugo version: v0.134.1-2f89169baa87a9db47e288b60705f4e99e21a945+extended windows/amd64 BuildDate=2024-09-05T10:17:50Z VendorInfo=gohugoio Relearn theme version: 6.4.0

Warnings on terminal:

PS C:\Users\iftak\Desktop\projects\kortephoan-school> hugo serve
port 1313 already in use, attempting to use an available port
Watching for changes in C:\Users\iftak\Desktop\projects\kortephoan-school\{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in C:\Users\iftak\Desktop\projects\kortephoan-school\config\_default, C:\Users\iftak\Desktop\projects\kortephoan-school\themes\hugo-theme-relearn\hugo.toml
Start building sites … 
hugo v0.134.1-2f89169baa87a9db47e288b60705f4e99e21a945+extended windows/amd64 BuildDate=2024-09-05T10:17:50Z VendorInfo=gohugoio

WARN  deprecated: .Sites.First was deprecated in Hugo v0.127.0 and will be removed in a future release. Use .Sites.Default instead.
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            |  49  
  Paginator pages  |   0  
  Non-page files   |   0  
  Static files     | 186  
  Processed images |   0  
  Aliases          |   0  
  Cleaned          |   0  

Built in 153 ms
Environment: "development"
Serving pages from disk
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:13406/ (bind address 127.0.0.1)
Press Ctrl+C to stop
McShelby commented 6 hours ago

Both will be fixed in the upcoming 7.0.0 release. See #912