The problem: On the FreeBSD documentation portal, cross-reference links inside books and articles are generated incorrectly. Both the extref and crossref Asciidoctor macros produce wrong URLs (for example, offline-style paths like ../path/index.html#anchor are used instead of the correct online paths). This makes navigation between chapters and books broken for users reading the documentation online.
It is reported in PR 295112.
The same issue affects the en-freebsd-doc package (version 20260508,1). In that package, instead of generating links to local files (as expected for offline use), the broken code produces links pointing to the external web server.
Root cause: The Hugo configuration passes the isOnline attribute as a boolean (true/false) inside [markup.asciidocExt.attributes]. However, the Ruby extensions in Asciidoctor compare this attribute with the string "1":
if doc.attributes['isonline'] == "1"
Because true is not equal to "1", the condition always evaluates to false. As a result, the extensions always choose the offline link generation branch, breaking both online and offline builds in different ways.
Why did it work before? Older Hugo versions (or a different Asciidoctor integration) likely converted boolean true/false into "1"/"0" automatically. That conversion no longer happens, so we need to make the values explicit. I am not sure about this, I do not have old hugo version and cannot check it.
The fix: Replace isOnline = true with isOnline = 1 and isOnline = false with isOnline = 0 in both hugo.toml (online) and the offline config.toml. This matches the expected string values in the Ruby code and restores correct link generation for both the live website and the offline package.