Page MenuHomeFreeBSD

doc: Refactor for Hugo 0.123.X compatibility
ClosedPublic

Authored by dbaio on Mar 9 2024, 4:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 4:02 AM
Unknown Object (File)
Tue, Apr 23, 7:53 AM
Unknown Object (File)
Thu, Apr 11, 7:28 PM
Unknown Object (File)
Thu, Apr 11, 5:08 PM
Unknown Object (File)
Thu, Apr 11, 8:35 AM
Unknown Object (File)
Sun, Apr 7, 7:50 PM
Unknown Object (File)
Sun, Apr 7, 4:40 AM
Unknown Object (File)
Sat, Mar 30, 5:03 PM

Details

Summary

For the review, please scroll down to the bottom to inspect the layout/theme changes in the last three files. The rest of the files/changes are essentially the same, with only the paths being altered.

I will break this into two commits:

documentation/themes: Refactor for Hugo 0.123.X compatibility

- Simplify path extraction logic in menu partial to match only with the main
  document/book, enhancing maintainability and future Hugo compatibility.

- Optimize articles and books directory listings by leveraging Hugo's built-in
  .Sections to fetch content, replacing manual slice construction and sorting
  logic. This approach streamlines the code and is more idiomatic with recent
  Hugo versions.

- These changes are part of necessary adjustments for the upgrade to Hugo
  version 0.123.X, ensuring our theme's compatibility and taking advantage of
  Hugo's latest features and performance improvements.

and

documentation: Adjust path variables for Hugo 0.123.X upgrade

These adjustments ensure menu and navigation will work fine with the recent
changes.

I need additional help with testing and more eyes to verify if there are any
other parts that broke after the upgrade.

So far, I've fixed three things:

  • The build process
  • The listing of books and articles
  • The books menu
Test Plan

Tested with:
hugo v0.123.8+extended freebsd/amd64 BuildDate=2024-03-07T20:57:02Z-0300 VendorInfo=freebsd
hugo v0.121.2+extended freebsd/amd64 BuildDate=2024-01-06T17:47:57Z+0000 VendorInfo=freebsd

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dbaio requested review of this revision.Mar 9 2024, 4:39 PM
fernape added a subscriber: fernape.

Builds fine for me and I can navigate the documents without issues.
Anything specific you would like me to test?

This revision is now accepted and ready to land.Mar 10 2024, 6:46 PM

In theory, this week I'll return to work in FreeBSD.
Give me a couple days please.

And thanks for your work on that