mirror of
https://git.FreeBSD.org/doc.git
synced 2026-09-09 00:07:23 +08:00
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:
@@ -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,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ $.Site.LanguageCode | default "en" }}">
|
||||
<html lang="{{ .Site.Language.Name }}">
|
||||
{{ partial "site-head.html" . }}
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user