Page MenuHomeFreeBSD

website: Modernize and simplify language logic
AcceptedPublic

Authored by ziaee on Mon, Mar 30, 11:57 PM.

Details

Summary

The website has really complex deprecated hugo logic for localization.
To simplify this and eliminate linter warnings, we first need a modern
hugo language key. Build that in hugo.toml, and remove all the extra
files related to the old way of doing this. This removes several INFO
messages about deprecated syntax during the build, increases clarity
of the build system, and allows us to begin transitioning off the
remaining deprecated elements.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71841
Build 68724: arc lint + arc unit

Event Timeline

ziaee created this revision.
website/themes/beastie/layouts/baseof.html
2

removing the $ allows this line to be overridden. The hugo.toml already specifies the default, so no need to do so twice.

im almost sure we dont need this file at all, modern hugo does this for us, but i dont know enough yet to fix the logic that has to change if we remove this.

website/themes/beastie/theme.toml
6

Note, this drops support for building the website with armv7. however, i would be astonished if anyone was doing that.

https://www.freshports.org/www/gohugo/

ziaee set the repository for this revision to R9 FreeBSD doc repository.
ziaee added a project: docs.

This is a much better approach

This revision is now accepted and ready to land.Tue, Mar 31, 7:50 AM

@ziaee I know this has dropped OK, but just wanted to say, don't get rid of baseof.html! I'm fairly sure it is the root of the whole template for Hugo. https://gohugo.io/templates/new-templatesystem-overview/#example-folder-structure

@ziaee I know this has dropped OK, but just wanted to say, don't get rid of baseof.html! I'm fairly sure it is the root of the whole template for Hugo. https://gohugo.io/templates/new-templatesystem-overview/#example-folder-structure

thanks for the doc! im interested in doing mechanical cleanup that produces no rendering change to unblock further development. im definitely not going to get rid of anything we need, and also going to wait on review from stakeholder teams, like this review will wait from translators.