website: Modernize and simplify language logic

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.

Reviewed by:		carlavilla
Differential Revision:	https://reviews.freebsd.org/D56173
This commit is contained in:
Alexander Ziaee
2026-04-02 15:28:17 -04:00
parent bc1d9997f0
commit 1971d0d1ff
6 changed files with 16 additions and 14 deletions
@@ -1,4 +0,0 @@
title = "The FreeBSD Project"
contentDir = "content/en"
languageName = "English"
weight = 1
@@ -1,4 +0,0 @@
title = "The FreeBSD Project"
contentDir = "content/ru"
languageName = "Russian"
weight = 12
@@ -1,4 +0,0 @@
title = "The FreeBSD Project"
contentDir = "content/zh-tw"
languageName = "繁體中文"
weight = 6
@@ -49,3 +49,17 @@ IsHTML = true
IsPlainText = false
noUgly = true
Rel = "alternate"
[languages]
[languages.en]
contentDir = "content/en"
label = "English"
weight = 1
[languages.ru]
contentDir = "content/ru"
label = "Russian"
weight = 2
[languages.zh-tw]
contentDir = "content/zh-tw"
label = "繁體中文"
weight = 3
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ $.Site.LanguageCode | default "en" }}">
<html lang="{{ .Site.Language.Name }}">
{{ partial "site-head.html" . }}
<body>
<div id="container">
+1 -1
View File
@@ -3,7 +3,7 @@ copyright = "BSD 2-clause 'Simplified' License"
description = "Theme to build the FreeBSD website"
homepage = "https://www.freebsd.org"
tags = ["website", "freebsd", "bsd"]
min_version = "0.146.0"
min_version = "0.153.0"
[author]
name = "Sergio Carlavilla"